Imports System.IO
Imports System.ComponentModel
Imports System.Runtime.InteropServices

Imports DevExpress.XtraEditors.Controls
Imports DevExpress.XtraGrid
Imports DevExpress.XtraGrid.Views.Grid
Imports DevExpress.XtraGrid.Views.Grid.ViewInfo
Imports DevExpress.XtraNavBar

Imports Phoenix.DataAccess
Imports Phoenix.Events
Imports Phoenix.Forms
Imports Phoenix.Forms.Area
Imports Phoenix.Forms.Dialogs
Imports Phoenix.Preferences
Imports Phoenix.Helpers

Namespace Forms.View

    Public Class MainView : Inherits ViewBase
        'GroupIndex = 1 - ViewMode
        'GroupIndex = 2 - CalendarViewMode
        'GroupIndex = 3 - Edit

#Region " Windows Form Designer generated code "

        Public Sub New()
            MyBase.New()

            'This call is required by the Windows Form Designer.
            InitializeComponent()

            'Add any initialization after the InitializeComponent() call
            PostInitializeComponent()

            ClientArea.ContextMenu = PopupMenuClient
            ClientArea.DefaultAction = New AreaBase.DefaultActionDelegate(AddressOf ClientForm.OpenForm)

            ServiceArea.ContextMenu = PopupMenuService
            ServiceArea.DefaultAction = New AreaBase.DefaultActionDelegate(AddressOf ServiceForm.OpenForm)

            ProductArea.ContextMenu = PopupMenuProduct
            ProductArea.DefaultAction = New AreaBase.DefaultActionDelegate(AddressOf ProductForm.OpenForm)

            EmployeeArea.ContextMenu = PopupMenuEmployee
            EmployeeArea.DefaultAction = New AreaBase.DefaultActionDelegate(AddressOf EmployeeForm.OpenForm)

            ScheduleArea.ContextMenu = PopupMenuAppointment
            DayCalendarArea.ContextMenu = PopupMenuAppointment
            MonthCalendarArea.ContextMenu = PopupMenuAppointment
            WeekCalendarArea.ContextMenu = PopupMenuAppointment

            AddHandler ClientArea.ClientSelectionChanged, AddressOf OnGridSelectionChanged
            AddHandler EmployeeArea.EmployeeSelectionChanged, AddressOf OnGridSelectionChanged
            AddHandler ServiceArea.ServiceSelectionChanged, AddressOf OnGridSelectionChanged
            AddHandler ProductArea.ProductSelectionChanged, AddressOf OnGridSelectionChanged
        End Sub

        'UserControl overrides dispose to clean up the component list.
        Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
            If disposing Then
                If Not (components Is Nothing) Then
                    Try
                        components.Dispose()
                    Catch ex As Exception 'TODO: exception on closing with CalendarView Toolbar 

                    End Try
                End If
            End If
            MyBase.Dispose(disposing)
        End Sub

        'Required by the Windows Form Designer
        Private components As System.ComponentModel.IContainer

        Friend WithEvents barDockControlTop As DevExpress.XtraBars.BarDockControl
        Friend WithEvents barDockControlBottom As DevExpress.XtraBars.BarDockControl
        Friend WithEvents barDockControlLeft As DevExpress.XtraBars.BarDockControl
        Friend WithEvents barDockControlRight As DevExpress.XtraBars.BarDockControl
        Friend WithEvents ContentPaneRoot As System.Windows.Forms.Panel
        Friend WithEvents ContentPaneSplitter As System.Windows.Forms.Splitter
        Friend WithEvents ContentPane As System.Windows.Forms.Panel
        Friend WithEvents TaskPane As DevExpress.XtraNavBar.NavBarControl
        Friend WithEvents BarManager As DevExpress.XtraBars.BarManager



        Friend WithEvents FileMenuBarItem As DevExpress.XtraBars.BarSubItem
        Friend WithEvents EditMenuBarItem As DevExpress.XtraBars.BarSubItem
        Friend WithEvents ViewMenuBarItem As DevExpress.XtraBars.BarSubItem
        Friend WithEvents ToolsMenuBarItem As DevExpress.XtraBars.BarSubItem
        Friend WithEvents HelpMenuBarItem As DevExpress.XtraBars.BarSubItem
        Friend WithEvents NewClientBarItem As DevExpress.XtraBars.BarButtonItem
        Friend WithEvents NewEmployeeBarItem As DevExpress.XtraBars.BarButtonItem
        Friend WithEvents NewServiceBarItem As DevExpress.XtraBars.BarButtonItem
        Friend WithEvents NewProductBarItem As DevExpress.XtraBars.BarButtonItem
        Friend WithEvents WeekViewBarItem As DevExpress.XtraBars.BarButtonItem
        Friend WithEvents MonthViewBarItem As DevExpress.XtraBars.BarButtonItem
        Friend WithEvents AboutBarItem As DevExpress.XtraBars.BarButtonItem
        Friend WithEvents CutBarItem As DevExpress.XtraBars.BarButtonItem
        Friend WithEvents CopyBarItem As DevExpress.XtraBars.BarButtonItem
        Friend WithEvents PasteBarItem As DevExpress.XtraBars.BarButtonItem
        Friend WithEvents DeleteBarItem As DevExpress.XtraBars.BarButtonItem
        Friend WithEvents FindBarItem As DevExpress.XtraBars.BarButtonItem
        Friend WithEvents GotoBarItem As DevExpress.XtraBars.BarButtonItem
        Friend WithEvents ReportsBarItem As DevExpress.XtraBars.BarButtonItem
        Friend WithEvents ClientsViewBarItem As DevExpress.XtraBars.BarButtonItem
        Friend WithEvents ServicesViewBarItem As DevExpress.XtraBars.BarButtonItem
        Friend WithEvents ProductsViewBarItem As DevExpress.XtraBars.BarButtonItem
        Friend WithEvents DayViewBarItem As DevExpress.XtraBars.BarButtonItem
        Friend WithEvents ToolbarsViewBarItem As DevExpress.XtraBars.BarSubItem
        Friend WithEvents NewAppointmentBarItem As DevExpress.XtraBars.BarButtonItem
        Friend WithEvents ToolbarsListBarItem As DevExpress.XtraBars.BarToolbarsListItem
        Friend WithEvents LogoffBarItem As DevExpress.XtraBars.BarButtonItem
        Friend WithEvents MainMenuBar As DevExpress.XtraBars.Bar
        Friend WithEvents ViewBar As DevExpress.XtraBars.Bar
        Friend WithEvents CalendarViewBar As DevExpress.XtraBars.Bar
        Friend WithEvents StandardBar As DevExpress.XtraBars.Bar
        Friend WithEvents MainStatusBar As DevExpress.XtraBars.Bar
        Friend WithEvents DockPanel As DevExpress.XtraBars.Docking.DockPanel
        Friend WithEvents NavBarClients As DevExpress.XtraNavBar.NavBarGroup
        Friend WithEvents NavBarServices As DevExpress.XtraNavBar.NavBarGroup
        Friend WithEvents NavBarProducts As DevExpress.XtraNavBar.NavBarGroup
        Friend WithEvents NavBarGroupControlContainer1 As DevExpress.XtraNavBar.NavBarGroupControlContainer
        Friend WithEvents NavBarGroupControlContainer2 As DevExpress.XtraNavBar.NavBarGroupControlContainer
        Friend WithEvents NavBarGroupControlContainer3 As DevExpress.XtraNavBar.NavBarGroupControlContainer
        Friend WithEvents NavBarGroupControlContainer4 As DevExpress.XtraNavBar.NavBarGroupControlContainer
        Friend WithEvents hideContainerRight As DevExpress.XtraBars.Docking.AutoHideContainer
        Friend WithEvents EmployeeName As DevExpress.XtraGrid.Columns.GridColumn
        Friend WithEvents NewBillBarItem As DevExpress.XtraBars.BarButtonItem
        Friend WithEvents BillNoSaleBarItem As DevExpress.XtraBars.BarButtonItem


        'NOTE: The following procedure is required by the Windows Form Designer
        'It can be modified using the Windows Form Designer.  
        'Do not modify it using te code editor.
        Friend WithEvents EmployeesViewBarItem As DevExpress.XtraBars.BarButtonItem
        Friend WithEvents NavBarEmployees As DevExpress.XtraNavBar.NavBarGroup
        Friend WithEvents NavBarGroupControlContainer5 As DevExpress.XtraNavBar.NavBarGroupControlContainer
        Friend WithEvents OptionsBarItem As DevExpress.XtraBars.BarButtonItem
        Friend WithEvents SelectAllBarItem As DevExpress.XtraBars.BarButtonItem
        Friend WithEvents PopupMenuEmployee As DevExpress.XtraBars.PopupMenu
        Friend WithEvents PopupMenuProduct As DevExpress.XtraBars.PopupMenu
        Friend WithEvents PopupMenuService As DevExpress.XtraBars.PopupMenu
        Friend WithEvents PopupMenuClient As DevExpress.XtraBars.PopupMenu
        Friend WithEvents OpenClientBarItem As DevExpress.XtraBars.BarButtonItem
        Friend WithEvents OpenServiceBarItem As DevExpress.XtraBars.BarButtonItem
        Friend WithEvents OpenProductBarItem As DevExpress.XtraBars.BarButtonItem
        Friend WithEvents OpenEmployeeBarItem As DevExpress.XtraBars.BarButtonItem
        Friend WithEvents ExitBarItem As DevExpress.XtraBars.BarButtonItem
        Friend WithEvents ClientArea As Phoenix.Forms.Area.ClientArea
        Friend WithEvents ServiceArea As Phoenix.Forms.Area.ServiceArea
        Friend WithEvents ProductArea As Phoenix.Forms.Area.ProductArea
        Friend WithEvents EmployeeArea As Phoenix.Forms.Area.EmployeeArea
        Friend WithEvents CalendarPane As DevExpress.XtraNavBar.NavBarControl
        Friend WithEvents NavBarSchedule As DevExpress.XtraNavBar.NavBarGroup
        Friend WithEvents NavBarDayCalendar As DevExpress.XtraNavBar.NavBarGroup
        Friend WithEvents NavBarMonthCalendar As DevExpress.XtraNavBar.NavBarGroup
        Friend WithEvents NewMenuBarItem As DevExpress.XtraBars.BarSubItem
        Friend WithEvents NavBarWeekCalendar As DevExpress.XtraNavBar.NavBarGroup
        Friend WithEvents ScheduleViewBarItem As DevExpress.XtraBars.BarButtonItem
        Friend WithEvents NavBarDayCalendarGroup As DevExpress.XtraNavBar.NavBarGroupControlContainer
        Friend WithEvents NavBarWeekCalendarGroup As DevExpress.XtraNavBar.NavBarGroupControlContainer
        Friend WithEvents NavBarMonthCalendarGroup As DevExpress.XtraNavBar.NavBarGroupControlContainer
        Friend WithEvents NavBarScheduleGroup As DevExpress.XtraNavBar.NavBarGroupControlContainer
        Friend WithEvents DayCalendarArea As Phoenix.Forms.Area.DayCalendarArea
        Friend WithEvents MonthCalendarArea As Phoenix.Forms.Area.MonthCalendarArea
        Friend WithEvents WeekCalendarArea As Phoenix.Forms.Area.WeekCalendarArea
        Friend WithEvents ScheduleArea As Phoenix.Forms.Area.ScheduleArea
        Friend WithEvents NextBarButtonItem As DevExpress.XtraBars.BarButtonItem
        Friend WithEvents PreviousBarButtonItem As DevExpress.XtraBars.BarButtonItem
        Friend WithEvents NavigationTimeBar As DevExpress.XtraBars.Bar
        Friend WithEvents TodayBarItem As DevExpress.XtraBars.BarButtonItem
        Friend WithEvents ToolTipController As DevExpress.Utils.ToolTipController
        Friend WithEvents PopupMenuAppointment As DevExpress.XtraBars.PopupMenu
        Friend WithEvents Bar1 As DevExpress.XtraBars.Bar
        Friend WithEvents OpenAppointmentBarItem As DevExpress.XtraBars.BarButtonItem
        Friend WithEvents PrintBarItem As DevExpress.XtraBars.BarButtonItem
        Friend WithEvents PrintDocument As System.Drawing.Printing.PrintDocument
        Friend WithEvents PrintDialog As System.Windows.Forms.PrintDialog
        Friend WithEvents PrintPreviewDialog As System.Windows.Forms.PrintPreviewDialog
        Friend WithEvents PrintPreviewBarItem As DevExpress.XtraBars.BarButtonItem
        Friend WithEvents PageSetupDialog As System.Windows.Forms.PageSetupDialog
        Friend WithEvents PageSetupBarItem As DevExpress.XtraBars.BarButtonItem
        <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
            Me.components = New System.ComponentModel.Container
            Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(MainView))
            Me.BarManager = New DevExpress.XtraBars.BarManager
            Me.MainMenuBar = New DevExpress.XtraBars.Bar
            Me.FileMenuBarItem = New DevExpress.XtraBars.BarSubItem
            Me.NewMenuBarItem = New DevExpress.XtraBars.BarSubItem
            Me.NewAppointmentBarItem = New DevExpress.XtraBars.BarButtonItem
            Me.NewClientBarItem = New DevExpress.XtraBars.BarButtonItem
            Me.NewEmployeeBarItem = New DevExpress.XtraBars.BarButtonItem
            Me.NewServiceBarItem = New DevExpress.XtraBars.BarButtonItem
            Me.NewProductBarItem = New DevExpress.XtraBars.BarButtonItem
            Me.BillNoSaleBarItem = New DevExpress.XtraBars.BarButtonItem
            Me.NewBillBarItem = New DevExpress.XtraBars.BarButtonItem
            Me.PrintBarItem = New DevExpress.XtraBars.BarButtonItem
            Me.PrintPreviewBarItem = New DevExpress.XtraBars.BarButtonItem
            Me.LogoffBarItem = New DevExpress.XtraBars.BarButtonItem
            Me.ExitBarItem = New DevExpress.XtraBars.BarButtonItem
            Me.EditMenuBarItem = New DevExpress.XtraBars.BarSubItem
            Me.CutBarItem = New DevExpress.XtraBars.BarButtonItem
            Me.CopyBarItem = New DevExpress.XtraBars.BarButtonItem
            Me.PasteBarItem = New DevExpress.XtraBars.BarButtonItem
            Me.SelectAllBarItem = New DevExpress.XtraBars.BarButtonItem
            Me.DeleteBarItem = New DevExpress.XtraBars.BarButtonItem
            Me.ViewMenuBarItem = New DevExpress.XtraBars.BarSubItem
            Me.ClientsViewBarItem = New DevExpress.XtraBars.BarButtonItem
            Me.ServicesViewBarItem = New DevExpress.XtraBars.BarButtonItem
            Me.ProductsViewBarItem = New DevExpress.XtraBars.BarButtonItem
            Me.EmployeesViewBarItem = New DevExpress.XtraBars.BarButtonItem
            Me.DayViewBarItem = New DevExpress.XtraBars.BarButtonItem
            Me.WeekViewBarItem = New DevExpress.XtraBars.BarButtonItem
            Me.MonthViewBarItem = New DevExpress.XtraBars.BarButtonItem
            Me.ScheduleViewBarItem = New DevExpress.XtraBars.BarButtonItem
            Me.ToolbarsViewBarItem = New DevExpress.XtraBars.BarSubItem
            Me.ToolbarsListBarItem = New DevExpress.XtraBars.BarToolbarsListItem
            Me.ToolsMenuBarItem = New DevExpress.XtraBars.BarSubItem
            Me.ReportsBarItem = New DevExpress.XtraBars.BarButtonItem
            Me.GotoBarItem = New DevExpress.XtraBars.BarButtonItem
            Me.TodayBarItem = New DevExpress.XtraBars.BarButtonItem
            Me.NextBarButtonItem = New DevExpress.XtraBars.BarButtonItem
            Me.PreviousBarButtonItem = New DevExpress.XtraBars.BarButtonItem
            Me.OptionsBarItem = New DevExpress.XtraBars.BarButtonItem
            Me.HelpMenuBarItem = New DevExpress.XtraBars.BarSubItem
            Me.AboutBarItem = New DevExpress.XtraBars.BarButtonItem
            Me.StandardBar = New DevExpress.XtraBars.Bar
            Me.ViewBar = New DevExpress.XtraBars.Bar
            Me.CalendarViewBar = New DevExpress.XtraBars.Bar
            Me.MainStatusBar = New DevExpress.XtraBars.Bar
            Me.NavigationTimeBar = New DevExpress.XtraBars.Bar
            Me.Bar1 = New DevExpress.XtraBars.Bar
            Me.barDockControlTop = New DevExpress.XtraBars.BarDockControl
            Me.barDockControlBottom = New DevExpress.XtraBars.BarDockControl
            Me.barDockControlLeft = New DevExpress.XtraBars.BarDockControl
            Me.barDockControlRight = New DevExpress.XtraBars.BarDockControl
            Me.FindBarItem = New DevExpress.XtraBars.BarButtonItem
            Me.OpenClientBarItem = New DevExpress.XtraBars.BarButtonItem
            Me.OpenServiceBarItem = New DevExpress.XtraBars.BarButtonItem
            Me.OpenProductBarItem = New DevExpress.XtraBars.BarButtonItem
            Me.OpenEmployeeBarItem = New DevExpress.XtraBars.BarButtonItem
            Me.OpenAppointmentBarItem = New DevExpress.XtraBars.BarButtonItem
            Me.ToolTipController = New DevExpress.Utils.ToolTipController(Me.components)
            Me.PopupMenuProduct = New DevExpress.XtraBars.PopupMenu
            Me.PopupMenuService = New DevExpress.XtraBars.PopupMenu
            Me.PopupMenuEmployee = New DevExpress.XtraBars.PopupMenu
            Me.ContentPaneRoot = New System.Windows.Forms.Panel
            Me.ContentPane = New System.Windows.Forms.Panel
            Me.CalendarPane = New DevExpress.XtraNavBar.NavBarControl
            Me.NavBarSchedule = New DevExpress.XtraNavBar.NavBarGroup
            Me.NavBarDayCalendarGroup = New DevExpress.XtraNavBar.NavBarGroupControlContainer
            Me.ScheduleArea = New Phoenix.Forms.Area.ScheduleArea
            Me.NavBarWeekCalendarGroup = New DevExpress.XtraNavBar.NavBarGroupControlContainer
            Me.DayCalendarArea = New Phoenix.Forms.Area.DayCalendarArea
            Me.NavBarMonthCalendarGroup = New DevExpress.XtraNavBar.NavBarGroupControlContainer
            Me.WeekCalendarArea = New Phoenix.Forms.Area.WeekCalendarArea
            Me.NavBarScheduleGroup = New DevExpress.XtraNavBar.NavBarGroupControlContainer
            Me.MonthCalendarArea = New Phoenix.Forms.Area.MonthCalendarArea
            Me.NavBarDayCalendar = New DevExpress.XtraNavBar.NavBarGroup
            Me.NavBarWeekCalendar = New DevExpress.XtraNavBar.NavBarGroup
            Me.NavBarMonthCalendar = New DevExpress.XtraNavBar.NavBarGroup
            Me.ContentPaneSplitter = New System.Windows.Forms.Splitter
            Me.TaskPane = New DevExpress.XtraNavBar.NavBarControl
            Me.NavBarClients = New DevExpress.XtraNavBar.NavBarGroup
            Me.NavBarGroupControlContainer1 = New DevExpress.XtraNavBar.NavBarGroupControlContainer
            Me.ClientArea = New Phoenix.Forms.Area.ClientArea
            Me.NavBarGroupControlContainer2 = New DevExpress.XtraNavBar.NavBarGroupControlContainer
            Me.ServiceArea = New Phoenix.Forms.Area.ServiceArea
            Me.NavBarGroupControlContainer3 = New DevExpress.XtraNavBar.NavBarGroupControlContainer
            Me.ProductArea = New Phoenix.Forms.Area.ProductArea
            Me.NavBarGroupControlContainer5 = New DevExpress.XtraNavBar.NavBarGroupControlContainer
            Me.EmployeeArea = New Phoenix.Forms.Area.EmployeeArea
            Me.NavBarServices = New DevExpress.XtraNavBar.NavBarGroup
            Me.NavBarProducts = New DevExpress.XtraNavBar.NavBarGroup
            Me.NavBarEmployees = New DevExpress.XtraNavBar.NavBarGroup
            Me.PopupMenuClient = New DevExpress.XtraBars.PopupMenu
            Me.PopupMenuAppointment = New DevExpress.XtraBars.PopupMenu
            Me.PrintDocument = New System.Drawing.Printing.PrintDocument
            Me.PrintDialog = New System.Windows.Forms.PrintDialog
            Me.PrintPreviewDialog = New System.Windows.Forms.PrintPreviewDialog
            Me.PageSetupDialog = New System.Windows.Forms.PageSetupDialog
            Me.PageSetupBarItem = New DevExpress.XtraBars.BarButtonItem
            CType(Me.BarManager, System.ComponentModel.ISupportInitialize).BeginInit()
            CType(Me.PopupMenuProduct, System.ComponentModel.ISupportInitialize).BeginInit()
            CType(Me.PopupMenuService, System.ComponentModel.ISupportInitialize).BeginInit()
            CType(Me.PopupMenuEmployee, System.ComponentModel.ISupportInitialize).BeginInit()
            Me.ContentPaneRoot.SuspendLayout()
            Me.ContentPane.SuspendLayout()
            CType(Me.CalendarPane, System.ComponentModel.ISupportInitialize).BeginInit()
            Me.CalendarPane.SuspendLayout()
            Me.NavBarDayCalendarGroup.SuspendLayout()
            Me.NavBarWeekCalendarGroup.SuspendLayout()
            Me.NavBarMonthCalendarGroup.SuspendLayout()
            Me.NavBarScheduleGroup.SuspendLayout()
            CType(Me.TaskPane, System.ComponentModel.ISupportInitialize).BeginInit()
            Me.TaskPane.SuspendLayout()
            Me.NavBarGroupControlContainer1.SuspendLayout()
            Me.NavBarGroupControlContainer2.SuspendLayout()
            Me.NavBarGroupControlContainer3.SuspendLayout()
            Me.NavBarGroupControlContainer5.SuspendLayout()
            CType(Me.PopupMenuClient, System.ComponentModel.ISupportInitialize).BeginInit()
            CType(Me.PopupMenuAppointment, System.ComponentModel.ISupportInitialize).BeginInit()
            Me.SuspendLayout()
            '
            'BarManager
            '
            Me.BarManager.Bars.AddRange(New DevExpress.XtraBars.Bar() {Me.MainMenuBar, Me.StandardBar, Me.ViewBar, Me.CalendarViewBar, Me.MainStatusBar, Me.NavigationTimeBar, Me.Bar1})
            Me.BarManager.Categories.AddRange(New DevExpress.XtraBars.BarManagerCategory() {New DevExpress.XtraBars.BarManagerCategory("File", New System.Guid("91a7742c-715a-4c60-a608-1d53118839d0")), New DevExpress.XtraBars.BarManagerCategory("Edit", New System.Guid("fb9899b0-3779-496c-85c3-55419cd70f08")), New DevExpress.XtraBars.BarManagerCategory("View", New System.Guid("411c4647-3ad7-4166-80cc-74606254fae3")), New DevExpress.XtraBars.BarManagerCategory("Tools", New System.Guid("eaaff790-fc38-413b-ab92-eca506d8ebbc")), New DevExpress.XtraBars.BarManagerCategory("Help", New System.Guid("0700c0c3-de88-4fa7-92d3-7448fed73cd7")), New DevExpress.XtraBars.BarManagerCategory("Menu Bar", New System.Guid("6b762e32-76bd-4bba-a12d-cc342502cd08"))})
            Me.BarManager.DockControls.Add(Me.barDockControlTop)
            Me.BarManager.DockControls.Add(Me.barDockControlBottom)
            Me.BarManager.DockControls.Add(Me.barDockControlLeft)
            Me.BarManager.DockControls.Add(Me.barDockControlRight)
            Me.BarManager.Form = Me
            Me.BarManager.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.FileMenuBarItem, Me.EditMenuBarItem, Me.ViewMenuBarItem, Me.ToolsMenuBarItem, Me.HelpMenuBarItem, Me.ExitBarItem, Me.ToolbarsViewBarItem, Me.OptionsBarItem, Me.NewMenuBarItem, Me.NewAppointmentBarItem, Me.AboutBarItem, Me.FindBarItem, Me.DayViewBarItem, Me.CutBarItem, Me.CopyBarItem, Me.PasteBarItem, Me.DeleteBarItem, Me.GotoBarItem, Me.ReportsBarItem, Me.ClientsViewBarItem, Me.ServicesViewBarItem, Me.ProductsViewBarItem, Me.EmployeesViewBarItem, Me.WeekViewBarItem, Me.MonthViewBarItem, Me.ScheduleViewBarItem, Me.NewClientBarItem, Me.NewEmployeeBarItem, Me.NewServiceBarItem, Me.NewProductBarItem, Me.ToolbarsListBarItem, Me.LogoffBarItem, Me.NewBillBarItem, Me.BillNoSaleBarItem, Me.SelectAllBarItem, Me.OpenClientBarItem, Me.OpenServiceBarItem, Me.OpenProductBarItem, Me.OpenEmployeeBarItem, Me.NextBarButtonItem, Me.PreviousBarButtonItem, Me.TodayBarItem, Me.OpenAppointmentBarItem, Me.PrintBarItem, Me.PrintPreviewBarItem, Me.PageSetupBarItem})
            Me.BarManager.MainMenu = Me.MainMenuBar
            Me.BarManager.MaxItemId = 106
            Me.BarManager.StatusBar = Me.MainStatusBar
            '
            'MainMenuBar
            '
            Me.MainMenuBar.BarName = "Main Menu"
            Me.MainMenuBar.DockCol = 0
            Me.MainMenuBar.DockRow = 0
            Me.MainMenuBar.DockStyle = DevExpress.XtraBars.BarDockStyle.Top
            Me.MainMenuBar.LinksPersistInfo.AddRange(New DevExpress.XtraBars.LinkPersistInfo() {New DevExpress.XtraBars.LinkPersistInfo(Me.FileMenuBarItem), New DevExpress.XtraBars.LinkPersistInfo(Me.EditMenuBarItem), New DevExpress.XtraBars.LinkPersistInfo(Me.ViewMenuBarItem), New DevExpress.XtraBars.LinkPersistInfo(Me.ToolsMenuBarItem), New DevExpress.XtraBars.LinkPersistInfo(Me.HelpMenuBarItem)})
            Me.MainMenuBar.OptionsBar.MultiLine = True
            Me.MainMenuBar.OptionsBar.UseWholeRow = True
            Me.MainMenuBar.Text = "Main Menu"
            '
            'FileMenuBarItem
            '
            Me.FileMenuBarItem.Caption = "&File"
            Me.FileMenuBarItem.CategoryGuid = New System.Guid("6b762e32-76bd-4bba-a12d-cc342502cd08")
            Me.FileMenuBarItem.Id = 3
            Me.FileMenuBarItem.LinksPersistInfo.AddRange(New DevExpress.XtraBars.LinkPersistInfo() {New DevExpress.XtraBars.LinkPersistInfo(Me.NewMenuBarItem), New DevExpress.XtraBars.LinkPersistInfo(Me.PageSetupBarItem, True), New DevExpress.XtraBars.LinkPersistInfo(Me.PrintBarItem), New DevExpress.XtraBars.LinkPersistInfo(Me.PrintPreviewBarItem), New DevExpress.XtraBars.LinkPersistInfo(Me.LogoffBarItem, True), New DevExpress.XtraBars.LinkPersistInfo(Me.ExitBarItem)})
            Me.FileMenuBarItem.Name = "FileMenuBarItem"
            '
            'NewMenuBarItem
            '
            Me.NewMenuBarItem.Caption = "&New"
            Me.NewMenuBarItem.CategoryGuid = New System.Guid("91a7742c-715a-4c60-a608-1d53118839d0")
            Me.NewMenuBarItem.Id = 38
            Me.NewMenuBarItem.LinksPersistInfo.AddRange(New DevExpress.XtraBars.LinkPersistInfo() {New DevExpress.XtraBars.LinkPersistInfo(Me.NewAppointmentBarItem), New DevExpress.XtraBars.LinkPersistInfo(Me.NewClientBarItem), New DevExpress.XtraBars.LinkPersistInfo(Me.NewEmployeeBarItem), New DevExpress.XtraBars.LinkPersistInfo(Me.NewServiceBarItem), New DevExpress.XtraBars.LinkPersistInfo(Me.NewProductBarItem), New DevExpress.XtraBars.LinkPersistInfo(Me.BillNoSaleBarItem), New DevExpress.XtraBars.LinkPersistInfo(Me.NewBillBarItem)})
            Me.NewMenuBarItem.Name = "NewMenuBarItem"
            '
            'NewAppointmentBarItem
            '
            Me.NewAppointmentBarItem.Caption = "&Appointment"
            Me.NewAppointmentBarItem.CategoryGuid = New System.Guid("91a7742c-715a-4c60-a608-1d53118839d0")
            Me.NewAppointmentBarItem.Hint = "111"
            Me.NewAppointmentBarItem.Id = 39
            Me.NewAppointmentBarItem.ImageIndex = 8
            Me.NewAppointmentBarItem.ItemShortcut = New DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.N))
            Me.NewAppointmentBarItem.Name = "NewAppointmentBarItem"
            '
            'NewClientBarItem
            '
            Me.NewClientBarItem.Caption = "&Client"
            Me.NewClientBarItem.CategoryGuid = New System.Guid("91a7742c-715a-4c60-a608-1d53118839d0")
            Me.NewClientBarItem.Id = 78
            Me.NewClientBarItem.ImageIndex = 9
            Me.NewClientBarItem.ItemShortcut = New DevExpress.XtraBars.BarShortcut(((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.Alt) _
                            Or System.Windows.Forms.Keys.C))
            Me.NewClientBarItem.Name = "NewClientBarItem"
            '
            'NewEmployeeBarItem
            '
            Me.NewEmployeeBarItem.Caption = "Staff &Member"
            Me.NewEmployeeBarItem.CategoryGuid = New System.Guid("91a7742c-715a-4c60-a608-1d53118839d0")
            Me.NewEmployeeBarItem.Id = 79
            Me.NewEmployeeBarItem.ImageIndex = 10
            Me.NewEmployeeBarItem.ItemShortcut = New DevExpress.XtraBars.BarShortcut(((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.Alt) _
                            Or System.Windows.Forms.Keys.M))
            Me.NewEmployeeBarItem.Name = "NewEmployeeBarItem"
            '
            'NewServiceBarItem
            '
            Me.NewServiceBarItem.Caption = "&Service"
            Me.NewServiceBarItem.CategoryGuid = New System.Guid("91a7742c-715a-4c60-a608-1d53118839d0")
            Me.NewServiceBarItem.Id = 80
            Me.NewServiceBarItem.ImageIndex = 12
            Me.NewServiceBarItem.ItemShortcut = New DevExpress.XtraBars.BarShortcut(((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.Alt) _
                            Or System.Windows.Forms.Keys.S))
            Me.NewServiceBarItem.Name = "NewServiceBarItem"
            '
            'NewProductBarItem
            '
            Me.NewProductBarItem.Caption = "&Product"
            Me.NewProductBarItem.CategoryGuid = New System.Guid("91a7742c-715a-4c60-a608-1d53118839d0")
            Me.NewProductBarItem.Id = 81
            Me.NewProductBarItem.ImageIndex = 11
            Me.NewProductBarItem.ItemShortcut = New DevExpress.XtraBars.BarShortcut(((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.Alt) _
                            Or System.Windows.Forms.Keys.P))
            Me.NewProductBarItem.Name = "NewProductBarItem"
            '
            'BillNoSaleBarItem
            '
            Me.BillNoSaleBarItem.Caption = "Pe&tty Cash"
            Me.BillNoSaleBarItem.CategoryGuid = New System.Guid("91a7742c-715a-4c60-a608-1d53118839d0")
            Me.BillNoSaleBarItem.Id = 93
            Me.BillNoSaleBarItem.ImageIndex = 28
            Me.BillNoSaleBarItem.ItemShortcut = New DevExpress.XtraBars.BarShortcut(((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.Alt) _
                            Or System.Windows.Forms.Keys.T))
            Me.BillNoSaleBarItem.Name = "BillNoSaleBarItem"
            '
            'NewBillBarItem
            '
            Me.NewBillBarItem.Caption = "&Bill"
            Me.NewBillBarItem.CategoryGuid = New System.Guid("91a7742c-715a-4c60-a608-1d53118839d0")
            Me.NewBillBarItem.Id = 92
            Me.NewBillBarItem.ImageIndex = 27
            Me.NewBillBarItem.ItemShortcut = New DevExpress.XtraBars.BarShortcut(((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.Alt) _
                            Or System.Windows.Forms.Keys.B))
            Me.NewBillBarItem.Name = "NewBillBarItem"
            '
            'PrintBarItem
            '
            Me.PrintBarItem.Caption = "&Print..."
            Me.PrintBarItem.CategoryGuid = New System.Guid("91a7742c-715a-4c60-a608-1d53118839d0")
            Me.PrintBarItem.Id = 103
            Me.PrintBarItem.ItemShortcut = New DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.P))
            Me.PrintBarItem.Name = "PrintBarItem"
            '
            'PrintPreviewBarItem
            '
            Me.PrintPreviewBarItem.Caption = "Print Pre&view..."
            Me.PrintPreviewBarItem.CategoryGuid = New System.Guid("91a7742c-715a-4c60-a608-1d53118839d0")
            Me.PrintPreviewBarItem.Id = 104
            Me.PrintPreviewBarItem.Name = "PrintPreviewBarItem"
            '
            'LogoffBarItem
            '
            Me.LogoffBarItem.Caption = "&Log off"
            Me.LogoffBarItem.CategoryGuid = New System.Guid("91a7742c-715a-4c60-a608-1d53118839d0")
            Me.LogoffBarItem.Id = 89
            Me.LogoffBarItem.ImageIndex = 29
            Me.LogoffBarItem.ItemShortcut = New DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.F4))
            Me.LogoffBarItem.Name = "LogoffBarItem"
            '
            'ExitBarItem
            '
            Me.ExitBarItem.Caption = "E&xit"
            Me.ExitBarItem.CategoryGuid = New System.Guid("91a7742c-715a-4c60-a608-1d53118839d0")
            Me.ExitBarItem.Id = 9
            Me.ExitBarItem.ItemShortcut = New DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Alt Or System.Windows.Forms.Keys.F4))
            Me.ExitBarItem.Name = "ExitBarItem"
            '
            'EditMenuBarItem
            '
            Me.EditMenuBarItem.Caption = "&Edit"
            Me.EditMenuBarItem.CategoryGuid = New System.Guid("6b762e32-76bd-4bba-a12d-cc342502cd08")
            Me.EditMenuBarItem.Id = 4
            Me.EditMenuBarItem.LinksPersistInfo.AddRange(New DevExpress.XtraBars.LinkPersistInfo() {New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.PaintStyle, Me.CutBarItem, DevExpress.XtraBars.BarItemPaintStyle.Standard), New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.PaintStyle, Me.CopyBarItem, DevExpress.XtraBars.BarItemPaintStyle.Standard), New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.PaintStyle, Me.PasteBarItem, DevExpress.XtraBars.BarItemPaintStyle.Standard), New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.PaintStyle, Me.SelectAllBarItem, "", True, True, True, 0, Nothing, DevExpress.XtraBars.BarItemPaintStyle.Standard), New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.PaintStyle, Me.DeleteBarItem, "", True, True, True, 0, Nothing, DevExpress.XtraBars.BarItemPaintStyle.Standard)})
            Me.EditMenuBarItem.Name = "EditMenuBarItem"
            '
            'CutBarItem
            '
            Me.CutBarItem.Caption = "Cut"
            Me.CutBarItem.CategoryGuid = New System.Guid("fb9899b0-3779-496c-85c3-55419cd70f08")
            Me.CutBarItem.GroupIndex = 3
            Me.CutBarItem.Hint = "Cut"
            Me.CutBarItem.Id = 53
            Me.CutBarItem.ImageIndex = 1
            Me.CutBarItem.ItemShortcut = New DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.X))
            Me.CutBarItem.Name = "CutBarItem"
            '
            'CopyBarItem
            '
            Me.CopyBarItem.Caption = "Copy"
            Me.CopyBarItem.CategoryGuid = New System.Guid("fb9899b0-3779-496c-85c3-55419cd70f08")
            Me.CopyBarItem.GroupIndex = 3
            Me.CopyBarItem.Hint = "Copy"
            Me.CopyBarItem.Id = 54
            Me.CopyBarItem.ImageIndex = 0
            Me.CopyBarItem.ItemShortcut = New DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.C))
            Me.CopyBarItem.Name = "CopyBarItem"
            '
            'PasteBarItem
            '
            Me.PasteBarItem.Caption = "Paste"
            Me.PasteBarItem.CategoryGuid = New System.Guid("fb9899b0-3779-496c-85c3-55419cd70f08")
            Me.PasteBarItem.GroupIndex = 3
            Me.PasteBarItem.Hint = "Paste"
            Me.PasteBarItem.Id = 55
            Me.PasteBarItem.ImageIndex = 3
            Me.PasteBarItem.ItemShortcut = New DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.V))
            Me.PasteBarItem.Name = "PasteBarItem"
            '
            'SelectAllBarItem
            '
            Me.SelectAllBarItem.Caption = "SelectAll"
            Me.SelectAllBarItem.CategoryGuid = New System.Guid("fb9899b0-3779-496c-85c3-55419cd70f08")
            Me.SelectAllBarItem.GroupIndex = 3
            Me.SelectAllBarItem.Id = 95
            Me.SelectAllBarItem.ItemShortcut = New DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.A))
            Me.SelectAllBarItem.Name = "SelectAllBarItem"
            '
            'DeleteBarItem
            '
            Me.DeleteBarItem.Caption = "Delete"
            Me.DeleteBarItem.CategoryGuid = New System.Guid("fb9899b0-3779-496c-85c3-55419cd70f08")
            Me.DeleteBarItem.GroupIndex = 3
            Me.DeleteBarItem.Hint = "Delete"
            Me.DeleteBarItem.Id = 56
            Me.DeleteBarItem.ImageIndex = 2
            Me.DeleteBarItem.ItemShortcut = New DevExpress.XtraBars.BarShortcut(System.Windows.Forms.Keys.Delete)
            Me.DeleteBarItem.Name = "DeleteBarItem"
            '
            'ViewMenuBarItem
            '
            Me.ViewMenuBarItem.Caption = "&View"
            Me.ViewMenuBarItem.CategoryGuid = New System.Guid("6b762e32-76bd-4bba-a12d-cc342502cd08")
            Me.ViewMenuBarItem.Id = 5
            Me.ViewMenuBarItem.LinksPersistInfo.AddRange(New DevExpress.XtraBars.LinkPersistInfo() {New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.PaintStyle, Me.ClientsViewBarItem, DevExpress.XtraBars.BarItemPaintStyle.Standard), New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.PaintStyle, Me.ServicesViewBarItem, DevExpress.XtraBars.BarItemPaintStyle.Standard), New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.PaintStyle, Me.ProductsViewBarItem, DevExpress.XtraBars.BarItemPaintStyle.Standard), New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.PaintStyle, Me.EmployeesViewBarItem, DevExpress.XtraBars.BarItemPaintStyle.Standard), New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.PaintStyle, Me.DayViewBarItem, "", True, True, True, 0, Nothing, DevExpress.XtraBars.BarItemPaintStyle.Standard), New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.PaintStyle, Me.WeekViewBarItem, DevExpress.XtraBars.BarItemPaintStyle.Standard), New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.PaintStyle, Me.MonthViewBarItem, DevExpress.XtraBars.BarItemPaintStyle.Standard), New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.PaintStyle, Me.ScheduleViewBarItem, DevExpress.XtraBars.BarItemPaintStyle.Standard), New DevExpress.XtraBars.LinkPersistInfo(Me.ToolbarsViewBarItem, True)})
            Me.ViewMenuBarItem.Name = "ViewMenuBarItem"
            '
            'ClientsViewBarItem
            '
            Me.ClientsViewBarItem.ButtonStyle = DevExpress.XtraBars.BarButtonStyle.Check
            Me.ClientsViewBarItem.Caption = "Clients"
            Me.ClientsViewBarItem.CategoryGuid = New System.Guid("411c4647-3ad7-4166-80cc-74606254fae3")
            Me.ClientsViewBarItem.Description = "Clients"
            Me.ClientsViewBarItem.GroupIndex = 1
            Me.ClientsViewBarItem.Hint = "Clients view"
            Me.ClientsViewBarItem.Id = 64
            Me.ClientsViewBarItem.ImageIndex = 14
            Me.ClientsViewBarItem.ItemShortcut = New DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.D2))
            Me.ClientsViewBarItem.Name = "ClientsViewBarItem"
            '
            'ServicesViewBarItem
            '
            Me.ServicesViewBarItem.ButtonStyle = DevExpress.XtraBars.BarButtonStyle.Check
            Me.ServicesViewBarItem.Caption = "Services"
            Me.ServicesViewBarItem.CategoryGuid = New System.Guid("411c4647-3ad7-4166-80cc-74606254fae3")
            Me.ServicesViewBarItem.Down = True
            Me.ServicesViewBarItem.GroupIndex = 1
            Me.ServicesViewBarItem.Hint = "Services view"
            Me.ServicesViewBarItem.Id = 65
            Me.ServicesViewBarItem.ImageIndex = 17
            Me.ServicesViewBarItem.ItemShortcut = New DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.D3))
            Me.ServicesViewBarItem.Name = "ServicesViewBarItem"
            '
            'ProductsViewBarItem
            '
            Me.ProductsViewBarItem.ButtonStyle = DevExpress.XtraBars.BarButtonStyle.Check
            Me.ProductsViewBarItem.Caption = "Products"
            Me.ProductsViewBarItem.CategoryGuid = New System.Guid("411c4647-3ad7-4166-80cc-74606254fae3")
            Me.ProductsViewBarItem.GroupIndex = 1
            Me.ProductsViewBarItem.Hint = "Products view"
            Me.ProductsViewBarItem.Id = 66
            Me.ProductsViewBarItem.ImageIndex = 16
            Me.ProductsViewBarItem.ItemShortcut = New DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.D4))
            Me.ProductsViewBarItem.Name = "ProductsViewBarItem"
            '
            'EmployeesViewBarItem
            '
            Me.EmployeesViewBarItem.ButtonStyle = DevExpress.XtraBars.BarButtonStyle.Check
            Me.EmployeesViewBarItem.Caption = "Employee"
            Me.EmployeesViewBarItem.CategoryGuid = New System.Guid("411c4647-3ad7-4166-80cc-74606254fae3")
            Me.EmployeesViewBarItem.GroupIndex = 1
            Me.EmployeesViewBarItem.Hint = "Employees view"
            Me.EmployeesViewBarItem.Id = 70
            Me.EmployeesViewBarItem.ImageIndex = 15
            Me.EmployeesViewBarItem.ItemShortcut = New DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.D5))
            Me.EmployeesViewBarItem.Name = "EmployeesViewBarItem"
            '
            'DayViewBarItem
            '
            Me.DayViewBarItem.ButtonStyle = DevExpress.XtraBars.BarButtonStyle.Check
            Me.DayViewBarItem.Caption = "Day"
            Me.DayViewBarItem.CategoryGuid = New System.Guid("411c4647-3ad7-4166-80cc-74606254fae3")
            Me.DayViewBarItem.GroupIndex = 2
            Me.DayViewBarItem.Hint = "Day calendar"
            Me.DayViewBarItem.Id = 48
            Me.DayViewBarItem.ImageIndex = 23
            Me.DayViewBarItem.ItemShortcut = New DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.D))
            Me.DayViewBarItem.Name = "DayViewBarItem"
            '
            'WeekViewBarItem
            '
            Me.WeekViewBarItem.ButtonStyle = DevExpress.XtraBars.BarButtonStyle.Check
            Me.WeekViewBarItem.Caption = "Week"
            Me.WeekViewBarItem.CategoryGuid = New System.Guid("411c4647-3ad7-4166-80cc-74606254fae3")
            Me.WeekViewBarItem.GroupIndex = 2
            Me.WeekViewBarItem.Hint = "Week calendar"
            Me.WeekViewBarItem.Id = 73
            Me.WeekViewBarItem.ImageIndex = 25
            Me.WeekViewBarItem.ItemShortcut = New DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.W))
            Me.WeekViewBarItem.Name = "WeekViewBarItem"
            '
            'MonthViewBarItem
            '
            Me.MonthViewBarItem.ButtonStyle = DevExpress.XtraBars.BarButtonStyle.Check
            Me.MonthViewBarItem.Caption = "Month"
            Me.MonthViewBarItem.CategoryGuid = New System.Guid("411c4647-3ad7-4166-80cc-74606254fae3")
            Me.MonthViewBarItem.GroupIndex = 2
            Me.MonthViewBarItem.Hint = "Month calendar"
            Me.MonthViewBarItem.Id = 74
            Me.MonthViewBarItem.ImageIndex = 24
            Me.MonthViewBarItem.ItemShortcut = New DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.M))
            Me.MonthViewBarItem.Name = "MonthViewBarItem"
            '
            'ScheduleViewBarItem
            '
            Me.ScheduleViewBarItem.ButtonStyle = DevExpress.XtraBars.BarButtonStyle.Check
            Me.ScheduleViewBarItem.Caption = "Schedule"
            Me.ScheduleViewBarItem.CategoryGuid = New System.Guid("411c4647-3ad7-4166-80cc-74606254fae3")
            Me.ScheduleViewBarItem.Down = True
            Me.ScheduleViewBarItem.GroupIndex = 2
            Me.ScheduleViewBarItem.Hint = "Scheduler"
            Me.ScheduleViewBarItem.Id = 75
            Me.ScheduleViewBarItem.ImageIndex = 18
            Me.ScheduleViewBarItem.ItemShortcut = New DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.H))
            Me.ScheduleViewBarItem.Name = "ScheduleViewBarItem"
            '
            'ToolbarsViewBarItem
            '
            Me.ToolbarsViewBarItem.Caption = "&Toolbars"
            Me.ToolbarsViewBarItem.CategoryGuid = New System.Guid("411c4647-3ad7-4166-80cc-74606254fae3")
            Me.ToolbarsViewBarItem.Id = 26
            Me.ToolbarsViewBarItem.LinksPersistInfo.AddRange(New DevExpress.XtraBars.LinkPersistInfo() {New DevExpress.XtraBars.LinkPersistInfo(Me.ToolbarsListBarItem)})
            Me.ToolbarsViewBarItem.Name = "ToolbarsViewBarItem"
            '
            'ToolbarsListBarItem
            '
            Me.ToolbarsListBarItem.Caption = "(Toolbars)"
            Me.ToolbarsListBarItem.Id = 88
            Me.ToolbarsListBarItem.Name = "ToolbarsListBarItem"
            '
            'ToolsMenuBarItem
            '
            Me.ToolsMenuBarItem.Caption = "&Tools"
            Me.ToolsMenuBarItem.CategoryGuid = New System.Guid("6b762e32-76bd-4bba-a12d-cc342502cd08")
            Me.ToolsMenuBarItem.Id = 6
            Me.ToolsMenuBarItem.LinksPersistInfo.AddRange(New DevExpress.XtraBars.LinkPersistInfo() {New DevExpress.XtraBars.LinkPersistInfo(Me.ReportsBarItem), New DevExpress.XtraBars.LinkPersistInfo(Me.GotoBarItem, True), New DevExpress.XtraBars.LinkPersistInfo(Me.TodayBarItem), New DevExpress.XtraBars.LinkPersistInfo(Me.NextBarButtonItem), New DevExpress.XtraBars.LinkPersistInfo(Me.PreviousBarButtonItem), New DevExpress.XtraBars.LinkPersistInfo(Me.OptionsBarItem, True)})
            Me.ToolsMenuBarItem.Name = "ToolsMenuBarItem"
            '
            'ReportsBarItem
            '
            Me.ReportsBarItem.Caption = "&Reports"
            Me.ReportsBarItem.CategoryGuid = New System.Guid("eaaff790-fc38-413b-ab92-eca506d8ebbc")
            Me.ReportsBarItem.Id = 60
            Me.ReportsBarItem.ImageIndex = 21
            Me.ReportsBarItem.Name = "ReportsBarItem"
            '
            'GotoBarItem
            '
            Me.GotoBarItem.Caption = "&Go To"
            Me.GotoBarItem.CategoryGuid = New System.Guid("eaaff790-fc38-413b-ab92-eca506d8ebbc")
            Me.GotoBarItem.Hint = "Go to date"
            Me.GotoBarItem.Id = 59
            Me.GotoBarItem.ImageIndex = 20
            Me.GotoBarItem.ItemShortcut = New DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.G))
            Me.GotoBarItem.Name = "GotoBarItem"
            '
            'TodayBarItem
            '
            Me.TodayBarItem.Caption = "&Today"
            Me.TodayBarItem.CategoryGuid = New System.Guid("eaaff790-fc38-413b-ab92-eca506d8ebbc")
            Me.TodayBarItem.Hint = "Go to today"
            Me.TodayBarItem.Id = 112
            Me.TodayBarItem.Name = "TodayBarItem"
            '
            'NextBarButtonItem
            '
            Me.NextBarButtonItem.Caption = "&Next"
            Me.NextBarButtonItem.CategoryGuid = New System.Guid("eaaff790-fc38-413b-ab92-eca506d8ebbc")
            Me.NextBarButtonItem.Hint = "Go to next date"
            Me.NextBarButtonItem.Id = 110
            Me.NextBarButtonItem.Name = "NextBarButtonItem"
            '
            'PreviousBarButtonItem
            '
            Me.PreviousBarButtonItem.Caption = "&Previous"
            Me.PreviousBarButtonItem.CategoryGuid = New System.Guid("eaaff790-fc38-413b-ab92-eca506d8ebbc")
            Me.PreviousBarButtonItem.Hint = "Go to previous date"
            Me.PreviousBarButtonItem.Id = 111
            Me.PreviousBarButtonItem.Name = "PreviousBarButtonItem"
            '
            'OptionsBarItem
            '
            Me.OptionsBarItem.Caption = "&Options..."
            Me.OptionsBarItem.CategoryGuid = New System.Guid("eaaff790-fc38-413b-ab92-eca506d8ebbc")
            Me.OptionsBarItem.Id = 32
            Me.OptionsBarItem.Name = "OptionsBarItem"
            '
            'HelpMenuBarItem
            '
            Me.HelpMenuBarItem.Caption = "&Help"
            Me.HelpMenuBarItem.CategoryGuid = New System.Guid("6b762e32-76bd-4bba-a12d-cc342502cd08")
            Me.HelpMenuBarItem.Id = 7
            Me.HelpMenuBarItem.LinksPersistInfo.AddRange(New DevExpress.XtraBars.LinkPersistInfo() {New DevExpress.XtraBars.LinkPersistInfo(Me.AboutBarItem)})
            Me.HelpMenuBarItem.Name = "HelpMenuBarItem"
            '
            'AboutBarItem
            '
            Me.AboutBarItem.Caption = "&About Phoenix iTill System"
            Me.AboutBarItem.CategoryGuid = New System.Guid("0700c0c3-de88-4fa7-92d3-7448fed73cd7")
            Me.AboutBarItem.Id = 42
            Me.AboutBarItem.Name = "AboutBarItem"
            '
            'StandardBar
            '
            Me.StandardBar.BarName = "Standard"
            Me.StandardBar.DockCol = 0
            Me.StandardBar.DockRow = 2
            Me.StandardBar.DockStyle = DevExpress.XtraBars.BarDockStyle.Top
            Me.StandardBar.FloatLocation = New System.Drawing.Point(521, 246)
            Me.StandardBar.LinksPersistInfo.AddRange(New DevExpress.XtraBars.LinkPersistInfo() {New DevExpress.XtraBars.LinkPersistInfo(Me.CutBarItem, True), New DevExpress.XtraBars.LinkPersistInfo(Me.CopyBarItem), New DevExpress.XtraBars.LinkPersistInfo(Me.PasteBarItem), New DevExpress.XtraBars.LinkPersistInfo(Me.DeleteBarItem, True)})
            Me.StandardBar.Offset = 7
            Me.StandardBar.Text = "Standard"
            Me.StandardBar.Visible = False
            '
            'ViewBar
            '
            Me.ViewBar.BarName = "View"
            Me.ViewBar.DockCol = 1
            Me.ViewBar.DockRow = 1
            Me.ViewBar.DockStyle = DevExpress.XtraBars.BarDockStyle.Top
            Me.ViewBar.FloatLocation = New System.Drawing.Point(565, 171)
            Me.ViewBar.LinksPersistInfo.AddRange(New DevExpress.XtraBars.LinkPersistInfo() {New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.PaintStyle, Me.ClientsViewBarItem, DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph), New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.PaintStyle, Me.ServicesViewBarItem, DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph), New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.PaintStyle, Me.ProductsViewBarItem, DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph), New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.PaintStyle, Me.EmployeesViewBarItem, DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph)})
            Me.ViewBar.Offset = 288
            Me.ViewBar.Text = "View"
            Me.ViewBar.Visible = False
            '
            'CalendarViewBar
            '
            Me.CalendarViewBar.BarName = "Calendar"
            Me.CalendarViewBar.DockCol = 0
            Me.CalendarViewBar.DockRow = 1
            Me.CalendarViewBar.DockStyle = DevExpress.XtraBars.BarDockStyle.Top
            Me.CalendarViewBar.FloatLocation = New System.Drawing.Point(127, 271)
            Me.CalendarViewBar.LinksPersistInfo.AddRange(New DevExpress.XtraBars.LinkPersistInfo() {New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.PaintStyle, Me.DayViewBarItem, DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph), New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.PaintStyle, Me.WeekViewBarItem, DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph), New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.PaintStyle, Me.MonthViewBarItem, DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph), New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.PaintStyle, Me.ScheduleViewBarItem, "", True, True, True, 0, Nothing, DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph)})
            Me.CalendarViewBar.Offset = 1
            Me.CalendarViewBar.Text = "Calendar"
            '
            'MainStatusBar
            '
            Me.MainStatusBar.Appearance.BackColor = System.Drawing.Color.Transparent
            Me.MainStatusBar.Appearance.BackColor2 = System.Drawing.Color.Transparent
            Me.MainStatusBar.Appearance.BorderColor = System.Drawing.Color.Transparent
            Me.MainStatusBar.Appearance.Options.UseBackColor = True
            Me.MainStatusBar.Appearance.Options.UseBorderColor = True
            Me.MainStatusBar.BarName = "StatusBar"
            Me.MainStatusBar.CanDockStyle = DevExpress.XtraBars.BarCanDockStyle.Bottom
            Me.MainStatusBar.DockCol = 0
            Me.MainStatusBar.DockRow = 0
            Me.MainStatusBar.DockStyle = DevExpress.XtraBars.BarDockStyle.Bottom
            Me.MainStatusBar.OptionsBar.AllowQuickCustomization = False
            Me.MainStatusBar.OptionsBar.DrawDragBorder = False
            Me.MainStatusBar.OptionsBar.UseWholeRow = True
            Me.MainStatusBar.Text = "Status Bar"
            '
            'NavigationTimeBar
            '
            Me.NavigationTimeBar.BarName = "GoTo"
            Me.NavigationTimeBar.DockCol = 1
            Me.NavigationTimeBar.DockRow = 1
            Me.NavigationTimeBar.DockStyle = DevExpress.XtraBars.BarDockStyle.Top
            Me.NavigationTimeBar.FloatLocation = New System.Drawing.Point(528, 190)
            Me.NavigationTimeBar.LinksPersistInfo.AddRange(New DevExpress.XtraBars.LinkPersistInfo() {New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.PaintStyle, Me.GotoBarItem, DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph), New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.PaintStyle, Me.PreviousBarButtonItem, "", True, True, True, 0, Nothing, DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph), New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.PaintStyle, Me.NextBarButtonItem, DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph), New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.PaintStyle, Me.TodayBarItem, "", True, True, True, 0, Nothing, DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph)})
            Me.NavigationTimeBar.Offset = 206
            Me.NavigationTimeBar.Text = "Goto"
            '
            'Bar1
            '
            Me.Bar1.BarName = "Logout"
            Me.Bar1.DockCol = 2
            Me.Bar1.DockRow = 1
            Me.Bar1.DockStyle = DevExpress.XtraBars.BarDockStyle.Top
            Me.Bar1.FloatLocation = New System.Drawing.Point(583, 189)
            Me.Bar1.LinksPersistInfo.AddRange(New DevExpress.XtraBars.LinkPersistInfo() {New DevExpress.XtraBars.LinkPersistInfo(Me.LogoffBarItem)})
            Me.Bar1.Offset = 490
            Me.Bar1.Text = "Logout"
            '
            'FindBarItem
            '
            Me.FindBarItem.Caption = "Find"
            Me.FindBarItem.CategoryGuid = New System.Guid("eaaff790-fc38-413b-ab92-eca506d8ebbc")
            Me.FindBarItem.Id = 46
            Me.FindBarItem.ImageIndex = 19
            Me.FindBarItem.ItemShortcut = New DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.F))
            Me.FindBarItem.Name = "FindBarItem"
            '
            'OpenClientBarItem
            '
            Me.OpenClientBarItem.Caption = "Open Client"
            Me.OpenClientBarItem.Id = 97
            Me.OpenClientBarItem.Name = "OpenClientBarItem"
            Me.OpenClientBarItem.Visibility = DevExpress.XtraBars.BarItemVisibility.OnlyInRuntime
            '
            'OpenServiceBarItem
            '
            Me.OpenServiceBarItem.Caption = "Open Service"
            Me.OpenServiceBarItem.Id = 98
            Me.OpenServiceBarItem.Name = "OpenServiceBarItem"
            Me.OpenServiceBarItem.Visibility = DevExpress.XtraBars.BarItemVisibility.OnlyInRuntime
            '
            'OpenProductBarItem
            '
            Me.OpenProductBarItem.Caption = "Open Product"
            Me.OpenProductBarItem.Id = 99
            Me.OpenProductBarItem.Name = "OpenProductBarItem"
            Me.OpenProductBarItem.Visibility = DevExpress.XtraBars.BarItemVisibility.OnlyInRuntime
            '
            'OpenEmployeeBarItem
            '
            Me.OpenEmployeeBarItem.Caption = "Open Employee"
            Me.OpenEmployeeBarItem.Id = 100
            Me.OpenEmployeeBarItem.Name = "OpenEmployeeBarItem"
            Me.OpenEmployeeBarItem.Visibility = DevExpress.XtraBars.BarItemVisibility.OnlyInRuntime
            '
            'OpenAppointmentBarItem
            '
            Me.OpenAppointmentBarItem.Caption = "Open Appointment"
            Me.OpenAppointmentBarItem.Id = 102
            Me.OpenAppointmentBarItem.Name = "OpenAppointmentBarItem"
            Me.OpenAppointmentBarItem.Visibility = DevExpress.XtraBars.BarItemVisibility.OnlyInRuntime
            '
            'ToolTipController
            '
            Me.ToolTipController.Style = New DevExpress.Utils.ViewStyle("ToolTip style")
            '
            'PopupMenuProduct
            '
            Me.PopupMenuProduct.LinksPersistInfo.AddRange(New DevExpress.XtraBars.LinkPersistInfo() {New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.Caption, Me.OpenProductBarItem, "Open"), New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.Caption, Me.NewProductBarItem, "New Product", True), New DevExpress.XtraBars.LinkPersistInfo(Me.CutBarItem, True), New DevExpress.XtraBars.LinkPersistInfo(Me.CopyBarItem), New DevExpress.XtraBars.LinkPersistInfo(Me.PasteBarItem), New DevExpress.XtraBars.LinkPersistInfo(Me.DeleteBarItem, True)})
            Me.PopupMenuProduct.Manager = Me.BarManager
            Me.PopupMenuProduct.Name = "PopupMenuProduct"
            '
            'PopupMenuService
            '
            Me.PopupMenuService.LinksPersistInfo.AddRange(New DevExpress.XtraBars.LinkPersistInfo() {New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.Caption, Me.OpenServiceBarItem, "Open"), New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.Caption, Me.NewServiceBarItem, "New Service", True), New DevExpress.XtraBars.LinkPersistInfo(Me.CutBarItem, True), New DevExpress.XtraBars.LinkPersistInfo(Me.CopyBarItem), New DevExpress.XtraBars.LinkPersistInfo(Me.PasteBarItem), New DevExpress.XtraBars.LinkPersistInfo(Me.DeleteBarItem, True)})
            Me.PopupMenuService.Manager = Me.BarManager
            Me.PopupMenuService.Name = "PopupMenuService"
            '
            'PopupMenuEmployee
            '
            Me.PopupMenuEmployee.LinksPersistInfo.AddRange(New DevExpress.XtraBars.LinkPersistInfo() {New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.Caption, Me.OpenEmployeeBarItem, "Open"), New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.Caption, Me.NewEmployeeBarItem, "New Employee", True), New DevExpress.XtraBars.LinkPersistInfo(Me.CutBarItem, True), New DevExpress.XtraBars.LinkPersistInfo(Me.CopyBarItem), New DevExpress.XtraBars.LinkPersistInfo(Me.PasteBarItem), New DevExpress.XtraBars.LinkPersistInfo(Me.DeleteBarItem, True)})
            Me.PopupMenuEmployee.Manager = Me.BarManager
            Me.PopupMenuEmployee.Name = "PopupMenuEmployee"
            '
            'ContentPaneRoot
            '
            Me.ContentPaneRoot.Controls.Add(Me.ContentPane)
            Me.ContentPaneRoot.Controls.Add(Me.ContentPaneSplitter)
            Me.ContentPaneRoot.Controls.Add(Me.TaskPane)
            Me.ContentPaneRoot.Dock = System.Windows.Forms.DockStyle.Fill
            Me.ContentPaneRoot.Location = New System.Drawing.Point(0, 46)
            Me.ContentPaneRoot.Name = "ContentPaneRoot"
            Me.ContentPaneRoot.Size = New System.Drawing.Size(905, 644)
            Me.ContentPaneRoot.TabIndex = 7
            '
            'ContentPane
            '
            Me.ContentPane.AllowDrop = True
            Me.ContentPane.CausesValidation = False
            Me.ContentPane.Controls.Add(Me.CalendarPane)
            Me.ContentPane.Dock = System.Windows.Forms.DockStyle.Fill
            Me.ContentPane.Location = New System.Drawing.Point(0, 0)
            Me.ContentPane.Name = "ContentPane"
            Me.ContentPane.Size = New System.Drawing.Size(706, 644)
            Me.ContentPane.TabIndex = 9
            '
            'CalendarPane
            '
            Me.CalendarPane.ActiveGroup = Me.NavBarSchedule
            Me.CalendarPane.AllowDrop = True
            Me.CalendarPane.Controls.Add(Me.NavBarDayCalendarGroup)
            Me.CalendarPane.Controls.Add(Me.NavBarWeekCalendarGroup)
            Me.CalendarPane.Controls.Add(Me.NavBarMonthCalendarGroup)
            Me.CalendarPane.Controls.Add(Me.NavBarScheduleGroup)
            Me.CalendarPane.Dock = System.Windows.Forms.DockStyle.Fill
            Me.CalendarPane.Groups.AddRange(New DevExpress.XtraNavBar.NavBarGroup() {Me.NavBarDayCalendar, Me.NavBarWeekCalendar, Me.NavBarMonthCalendar, Me.NavBarSchedule})
            Me.CalendarPane.Location = New System.Drawing.Point(0, 0)
            Me.CalendarPane.Name = "CalendarPane"
            Me.CalendarPane.NavigationPaneMaxVisibleGroups = 0
            Me.CalendarPane.Size = New System.Drawing.Size(706, 644)
            Me.CalendarPane.TabIndex = 0
            Me.CalendarPane.Text = "NavBarControl1"
            Me.CalendarPane.View = New DevExpress.XtraNavBar.ViewInfo.NavigationPaneViewInfoRegistrator
            '
            'NavBarSchedule
            '
            Me.NavBarSchedule.Caption = "Scheduler"
            Me.NavBarSchedule.ControlContainer = Me.NavBarDayCalendarGroup
            Me.NavBarSchedule.Expanded = True
            Me.NavBarSchedule.GroupClientHeight = 588
            Me.NavBarSchedule.GroupStyle = DevExpress.XtraNavBar.NavBarGroupStyle.ControlContainer
            Me.NavBarSchedule.Hint = "Schedule"
            Me.NavBarSchedule.Name = "NavBarSchedule"
            Me.NavBarSchedule.SmallImageIndex = 18
            '
            'NavBarDayCalendarGroup
            '
            Me.NavBarDayCalendarGroup.Controls.Add(Me.ScheduleArea)
            Me.NavBarDayCalendarGroup.Name = "NavBarDayCalendarGroup"
            Me.NavBarDayCalendarGroup.Size = New System.Drawing.Size(704, 588)
            Me.NavBarDayCalendarGroup.TabIndex = 0
            '
            'ScheduleArea
            '
            Me.ScheduleArea.CurrentDate = New Date(2005, 6, 10, 0, 0, 0, 0)
            Me.ScheduleArea.Dock = System.Windows.Forms.DockStyle.Fill
            Me.ScheduleArea.FirstDate = New Date(2005, 6, 10, 0, 0, 0, 0)
            Me.ScheduleArea.Location = New System.Drawing.Point(0, 0)
            Me.ScheduleArea.Name = "ScheduleArea"
            Me.ScheduleArea.Size = New System.Drawing.Size(704, 588)
            Me.ScheduleArea.TabIndex = 0
            '
            'NavBarWeekCalendarGroup
            '
            Me.NavBarWeekCalendarGroup.Controls.Add(Me.DayCalendarArea)
            Me.NavBarWeekCalendarGroup.Name = "NavBarWeekCalendarGroup"
            Me.NavBarWeekCalendarGroup.Size = New System.Drawing.Size(538, 309)
            Me.NavBarWeekCalendarGroup.TabIndex = 1
            '
            'DayCalendarArea
            '
            Me.DayCalendarArea.CurrentDate = New Date(2005, 6, 10, 0, 0, 0, 0)
            Me.DayCalendarArea.Dock = System.Windows.Forms.DockStyle.Fill
            Me.DayCalendarArea.FirstDate = New Date(2005, 6, 10, 0, 0, 0, 0)
            Me.DayCalendarArea.Location = New System.Drawing.Point(0, 0)
            Me.DayCalendarArea.Name = "DayCalendarArea"
            Me.DayCalendarArea.Size = New System.Drawing.Size(538, 309)
            Me.DayCalendarArea.TabIndex = 1
            '
            'NavBarMonthCalendarGroup
            '
            Me.NavBarMonthCalendarGroup.Controls.Add(Me.WeekCalendarArea)
            Me.NavBarMonthCalendarGroup.Name = "NavBarMonthCalendarGroup"
            Me.NavBarMonthCalendarGroup.Size = New System.Drawing.Size(538, 309)
            Me.NavBarMonthCalendarGroup.TabIndex = 2
            '
            'WeekCalendarArea
            '
            Me.WeekCalendarArea.CurrentDate = New Date(2005, 6, 6, 0, 0, 0, 0)
            Me.WeekCalendarArea.Dock = System.Windows.Forms.DockStyle.Fill
            Me.WeekCalendarArea.FirstDate = New Date(2005, 6, 6, 0, 0, 0, 0)
            Me.WeekCalendarArea.Location = New System.Drawing.Point(0, 0)
            Me.WeekCalendarArea.Name = "WeekCalendarArea"
            Me.WeekCalendarArea.Size = New System.Drawing.Size(538, 309)
            Me.WeekCalendarArea.TabIndex = 0
            '
            'NavBarScheduleGroup
            '
            Me.NavBarScheduleGroup.Controls.Add(Me.MonthCalendarArea)
            Me.NavBarScheduleGroup.Name = "NavBarScheduleGroup"
            Me.NavBarScheduleGroup.Size = New System.Drawing.Size(538, 309)
            Me.NavBarScheduleGroup.TabIndex = 3
            '
            'MonthCalendarArea
            '
            Me.MonthCalendarArea.CurrentDate = New Date(2005, 6, 6, 0, 0, 0, 0)
            Me.MonthCalendarArea.Dock = System.Windows.Forms.DockStyle.Fill
            Me.MonthCalendarArea.FirstDate = New Date(2005, 6, 6, 0, 0, 0, 0)
            Me.MonthCalendarArea.Location = New System.Drawing.Point(0, 0)
            Me.MonthCalendarArea.Name = "MonthCalendarArea"
            Me.MonthCalendarArea.Size = New System.Drawing.Size(538, 309)
            Me.MonthCalendarArea.TabIndex = 1
            '
            'NavBarDayCalendar
            '
            Me.NavBarDayCalendar.Caption = "Day Calendar"
            Me.NavBarDayCalendar.ControlContainer = Me.NavBarWeekCalendarGroup
            Me.NavBarDayCalendar.GroupClientHeight = 309
            Me.NavBarDayCalendar.GroupStyle = DevExpress.XtraNavBar.NavBarGroupStyle.ControlContainer
            Me.NavBarDayCalendar.Hint = "Day Calendar"
            Me.NavBarDayCalendar.Name = "NavBarDayCalendar"
            Me.NavBarDayCalendar.SmallImageIndex = 23
            '
            'NavBarWeekCalendar
            '
            Me.NavBarWeekCalendar.Caption = "Week Calendar"
            Me.NavBarWeekCalendar.ControlContainer = Me.NavBarMonthCalendarGroup
            Me.NavBarWeekCalendar.GroupClientHeight = 309
            Me.NavBarWeekCalendar.GroupStyle = DevExpress.XtraNavBar.NavBarGroupStyle.ControlContainer
            Me.NavBarWeekCalendar.Hint = "Week Calendar"
            Me.NavBarWeekCalendar.LargeImage = CType(resources.GetObject("NavBarWeekCalendar.LargeImage"), System.Drawing.Image)
            Me.NavBarWeekCalendar.Name = "NavBarWeekCalendar"
            Me.NavBarWeekCalendar.SmallImageIndex = 25
            '
            'NavBarMonthCalendar
            '
            Me.NavBarMonthCalendar.Caption = "Month Calendar"
            Me.NavBarMonthCalendar.ControlContainer = Me.NavBarScheduleGroup
            Me.NavBarMonthCalendar.GroupClientHeight = 309
            Me.NavBarMonthCalendar.GroupStyle = DevExpress.XtraNavBar.NavBarGroupStyle.ControlContainer
            Me.NavBarMonthCalendar.Hint = "Month Calendar"
            Me.NavBarMonthCalendar.Name = "NavBarMonthCalendar"
            Me.NavBarMonthCalendar.SmallImageIndex = 24
            '
            'ContentPaneSplitter
            '
            Me.ContentPaneSplitter.Dock = System.Windows.Forms.DockStyle.Right
            Me.ContentPaneSplitter.Location = New System.Drawing.Point(706, 0)
            Me.ContentPaneSplitter.MinSize = 100
            Me.ContentPaneSplitter.Name = "ContentPaneSplitter"
            Me.ContentPaneSplitter.Size = New System.Drawing.Size(5, 644)
            Me.ContentPaneSplitter.TabIndex = 8
            Me.ContentPaneSplitter.TabStop = False
            '
            'TaskPane
            '
            Me.TaskPane.ActiveGroup = Me.NavBarClients
            Me.TaskPane.AllowDrop = True
            Me.TaskPane.Controls.Add(Me.NavBarGroupControlContainer2)
            Me.TaskPane.Controls.Add(Me.NavBarGroupControlContainer3)
            Me.TaskPane.Controls.Add(Me.NavBarGroupControlContainer1)
            Me.TaskPane.Controls.Add(Me.NavBarGroupControlContainer5)
            Me.TaskPane.Dock = System.Windows.Forms.DockStyle.Right
            Me.TaskPane.Groups.AddRange(New DevExpress.XtraNavBar.NavBarGroup() {Me.NavBarClients, Me.NavBarServices, Me.NavBarProducts, Me.NavBarEmployees})
            Me.TaskPane.Location = New System.Drawing.Point(711, 0)
            Me.TaskPane.Name = "TaskPane"
            Me.TaskPane.NavigationPaneGroupClientHeight = 10
            Me.TaskPane.NavigationPaneMaxVisibleGroups = 0
            Me.TaskPane.Size = New System.Drawing.Size(194, 644)
            Me.TaskPane.Styles.AddReplace("Style2", New DevExpress.Utils.ViewStyleEx("Style2", "", System.Drawing.SystemColors.Window, System.Drawing.SystemColors.WindowText, System.Drawing.Color.Empty, System.Drawing.Drawing2D.LinearGradientMode.Horizontal))
            Me.TaskPane.Styles.AddReplace("Item", New DevExpress.Utils.ViewStyleEx("Item", "NavBarControl", "", True, True, False, DevExpress.Utils.HorzAlignment.Center, DevExpress.Utils.VertAlignment.Center, Nothing, System.Drawing.Color.FromArgb(CType(255, Byte), CType(128, Byte), CType(128, Byte)), System.Drawing.SystemColors.WindowText, System.Drawing.Color.White, System.Drawing.Drawing2D.LinearGradientMode.Horizontal))
            Me.TaskPane.Styles.AddReplace("Style1", New DevExpress.Utils.ViewStyleEx("Style1", "", System.Drawing.SystemColors.Window, System.Drawing.SystemColors.WindowText, System.Drawing.Color.Empty, System.Drawing.Drawing2D.LinearGradientMode.Horizontal))
            Me.TaskPane.Styles.AddReplace("NavigationPaneHeader", New DevExpress.Utils.ViewStyleEx("NavigationPaneHeader", "NavBarControl", New System.Drawing.Font("Microsoft Sans Serif", 11.0!, System.Drawing.FontStyle.Bold), System.Drawing.Color.Empty, System.Drawing.Color.Empty, System.Drawing.Color.Empty, System.Drawing.Drawing2D.LinearGradientMode.Horizontal))
            Me.TaskPane.TabIndex = 7
            Me.TaskPane.Text = "TaskPane"
            Me.TaskPane.View = New DevExpress.XtraNavBar.ViewInfo.NavigationPaneViewInfoRegistrator
            '
            'NavBarClients
            '
            Me.NavBarClients.Caption = "Clients"
            Me.NavBarClients.ControlContainer = Me.NavBarGroupControlContainer1
            Me.NavBarClients.Expanded = True
            Me.NavBarClients.GroupClientHeight = 588
            Me.NavBarClients.GroupStyle = DevExpress.XtraNavBar.NavBarGroupStyle.ControlContainer
            Me.NavBarClients.Name = "NavBarClients"
            Me.NavBarClients.SmallImageIndex = 14
            '
            'NavBarGroupControlContainer1
            '
            Me.NavBarGroupControlContainer1.Controls.Add(Me.ClientArea)
            Me.NavBarGroupControlContainer1.Name = "NavBarGroupControlContainer1"
            Me.NavBarGroupControlContainer1.Size = New System.Drawing.Size(192, 588)
            Me.NavBarGroupControlContainer1.TabIndex = 0
            '
            'ClientArea
            '
            Me.ClientArea.Dock = System.Windows.Forms.DockStyle.Fill
            Me.ClientArea.Location = New System.Drawing.Point(0, 0)
            Me.ClientArea.Name = "ClientArea"
            Me.ClientArea.Size = New System.Drawing.Size(192, 588)
            Me.ClientArea.TabIndex = 2
            '
            'NavBarGroupControlContainer2
            '
            Me.NavBarGroupControlContainer2.Controls.Add(Me.ServiceArea)
            Me.NavBarGroupControlContainer2.Name = "NavBarGroupControlContainer2"
            Me.NavBarGroupControlContainer2.Size = New System.Drawing.Size(192, 309)
            Me.NavBarGroupControlContainer2.TabIndex = 1
            '
            'ServiceArea
            '
            Me.ServiceArea.Dock = System.Windows.Forms.DockStyle.Fill
            Me.ServiceArea.Location = New System.Drawing.Point(0, 0)
            Me.ServiceArea.Name = "ServiceArea"
            Me.ServiceArea.Size = New System.Drawing.Size(192, 309)
            Me.ServiceArea.TabIndex = 0
            '
            'NavBarGroupControlContainer3
            '
            Me.NavBarGroupControlContainer3.Controls.Add(Me.ProductArea)
            Me.NavBarGroupControlContainer3.Name = "NavBarGroupControlContainer3"
            Me.NavBarGroupControlContainer3.Size = New System.Drawing.Size(192, 339)
            Me.NavBarGroupControlContainer3.TabIndex = 2
            '
            'ProductArea
            '
            Me.ProductArea.Dock = System.Windows.Forms.DockStyle.Fill
            Me.ProductArea.Location = New System.Drawing.Point(0, 0)
            Me.ProductArea.Name = "ProductArea"
            Me.ProductArea.Size = New System.Drawing.Size(192, 339)
            Me.ProductArea.TabIndex = 1
            '
            'NavBarGroupControlContainer5
            '
            Me.NavBarGroupControlContainer5.Controls.Add(Me.EmployeeArea)
            Me.NavBarGroupControlContainer5.Name = "NavBarGroupControlContainer5"
            Me.NavBarGroupControlContainer5.Size = New System.Drawing.Size(192, 565)
            Me.NavBarGroupControlContainer5.TabIndex = 3
            '
            'EmployeeArea
            '
            Me.EmployeeArea.Dock = System.Windows.Forms.DockStyle.Fill
            Me.EmployeeArea.Location = New System.Drawing.Point(0, 0)
            Me.EmployeeArea.Name = "EmployeeArea"
            Me.EmployeeArea.Size = New System.Drawing.Size(192, 565)
            Me.EmployeeArea.TabIndex = 1
            '
            'NavBarServices
            '
            Me.NavBarServices.Caption = "Services"
            Me.NavBarServices.ControlContainer = Me.NavBarGroupControlContainer2
            Me.NavBarServices.GroupClientHeight = 309
            Me.NavBarServices.GroupStyle = DevExpress.XtraNavBar.NavBarGroupStyle.ControlContainer
            Me.NavBarServices.Name = "NavBarServices"
            Me.NavBarServices.SmallImageIndex = 17
            '
            'NavBarProducts
            '
            Me.NavBarProducts.Caption = "Products"
            Me.NavBarProducts.ControlContainer = Me.NavBarGroupControlContainer3
            Me.NavBarProducts.GroupClientHeight = 339
            Me.NavBarProducts.GroupStyle = DevExpress.XtraNavBar.NavBarGroupStyle.ControlContainer
            Me.NavBarProducts.Name = "NavBarProducts"
            Me.NavBarProducts.SmallImageIndex = 16
            '
            'NavBarEmployees
            '
            Me.NavBarEmployees.Caption = "Employees"
            Me.NavBarEmployees.ControlContainer = Me.NavBarGroupControlContainer5
            Me.NavBarEmployees.GroupClientHeight = 565
            Me.NavBarEmployees.GroupStyle = DevExpress.XtraNavBar.NavBarGroupStyle.ControlContainer
            Me.NavBarEmployees.Name = "NavBarEmployees"
            Me.NavBarEmployees.SmallImageIndex = 15
            '
            'PopupMenuClient
            '
            Me.PopupMenuClient.LinksPersistInfo.AddRange(New DevExpress.XtraBars.LinkPersistInfo() {New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.Caption, Me.OpenClientBarItem, "Open"), New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.Caption, Me.NewClientBarItem, "New Client", True), New DevExpress.XtraBars.LinkPersistInfo(Me.CutBarItem, True), New DevExpress.XtraBars.LinkPersistInfo(Me.CopyBarItem), New DevExpress.XtraBars.LinkPersistInfo(Me.PasteBarItem), New DevExpress.XtraBars.LinkPersistInfo(Me.DeleteBarItem, True)})
            Me.PopupMenuClient.Manager = Me.BarManager
            Me.PopupMenuClient.Name = "PopupMenuClient"
            '
            'PopupMenuAppointment
            '
            Me.PopupMenuAppointment.LinksPersistInfo.AddRange(New DevExpress.XtraBars.LinkPersistInfo() {New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.Caption, Me.OpenAppointmentBarItem, "Open "), New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.Caption, Me.NewBillBarItem, "Create Bill", True), New DevExpress.XtraBars.LinkPersistInfo(DevExpress.XtraBars.BarLinkUserDefines.Caption, Me.NewAppointmentBarItem, "Create &Appointment"), New DevExpress.XtraBars.LinkPersistInfo(Me.CopyBarItem, True), New DevExpress.XtraBars.LinkPersistInfo(Me.PasteBarItem), New DevExpress.XtraBars.LinkPersistInfo(Me.DeleteBarItem, True)})
            Me.PopupMenuAppointment.Manager = Me.BarManager
            Me.PopupMenuAppointment.Name = "PopupMenuAppointment"
            '
            'PrintDocument
            '
            '
            'PrintDialog
            '
            Me.PrintDialog.Document = Me.PrintDocument
            '
            'PrintPreviewDialog
            '
            Me.PrintPreviewDialog.AutoScrollMargin = New System.Drawing.Size(0, 0)
            Me.PrintPreviewDialog.AutoScrollMinSize = New System.Drawing.Size(0, 0)
            Me.PrintPreviewDialog.ClientSize = New System.Drawing.Size(400, 300)
            Me.PrintPreviewDialog.Document = Me.PrintDocument
            Me.PrintPreviewDialog.Enabled = True
            Me.PrintPreviewDialog.Icon = CType(resources.GetObject("PrintPreviewDialog.Icon"), System.Drawing.Icon)
            Me.PrintPreviewDialog.Location = New System.Drawing.Point(110, 145)
            Me.PrintPreviewDialog.MinimumSize = New System.Drawing.Size(375, 250)
            Me.PrintPreviewDialog.Name = "PrintPreviewDialog"
            Me.PrintPreviewDialog.TransparencyKey = System.Drawing.Color.Empty
            Me.PrintPreviewDialog.Visible = False
            '
            'PageSetupDialog
            '
            Me.PageSetupDialog.Document = Me.PrintDocument
            '
            'PageSetupBarItem
            '
            Me.PageSetupBarItem.Caption = "Page Set&up..."
            Me.PageSetupBarItem.CategoryGuid = New System.Guid("91a7742c-715a-4c60-a608-1d53118839d0")
            Me.PageSetupBarItem.Id = 105
            Me.PageSetupBarItem.Name = "PageSetupBarItem"
            '
            'MainView
            '
            Me.Controls.Add(Me.ContentPaneRoot)
            Me.Controls.Add(Me.barDockControlLeft)
            Me.Controls.Add(Me.barDockControlRight)
            Me.Controls.Add(Me.barDockControlBottom)
            Me.Controls.Add(Me.barDockControlTop)
            Me.Name = "MainView"
            Me.Size = New System.Drawing.Size(905, 712)
            CType(Me.BarManager, System.ComponentModel.ISupportInitialize).EndInit()
            CType(Me.PopupMenuProduct, System.ComponentModel.ISupportInitialize).EndInit()
            CType(Me.PopupMenuService, System.ComponentModel.ISupportInitialize).EndInit()
            CType(Me.PopupMenuEmployee, System.ComponentModel.ISupportInitialize).EndInit()
            Me.ContentPaneRoot.ResumeLayout(False)
            Me.ContentPane.ResumeLayout(False)
            CType(Me.CalendarPane, System.ComponentModel.ISupportInitialize).EndInit()
            Me.CalendarPane.ResumeLayout(False)
            Me.NavBarDayCalendarGroup.ResumeLayout(False)
            Me.NavBarWeekCalendarGroup.ResumeLayout(False)
            Me.NavBarMonthCalendarGroup.ResumeLayout(False)
            Me.NavBarScheduleGroup.ResumeLayout(False)
            CType(Me.TaskPane, System.ComponentModel.ISupportInitialize).EndInit()
            Me.TaskPane.ResumeLayout(False)
            Me.NavBarGroupControlContainer1.ResumeLayout(False)
            Me.NavBarGroupControlContainer2.ResumeLayout(False)
            Me.NavBarGroupControlContainer3.ResumeLayout(False)
            Me.NavBarGroupControlContainer5.ResumeLayout(False)
            CType(Me.PopupMenuClient, System.ComponentModel.ISupportInitialize).EndInit()
            CType(Me.PopupMenuAppointment, System.ComponentModel.ISupportInitialize).EndInit()
            Me.ResumeLayout(False)

        End Sub

#End Region

#Region " Overrided Members "
        Protected Overrides Sub OnViewCreated(ByVal e As EventArgs)
            LoadPreferences(AppUserPreferences.GetNodeForPath(Name))
            MyBase.OnViewCreated(e)
        End Sub

        Protected Overrides Sub OnViewDestroyed(ByVal e As EventArgs)
            SavePreferences(AppUserPreferences.GetNodeForPath(Name))
            MyBase.OnViewDestroyed(e)
        End Sub
#End Region

#Region " Private fields "
        Private WithEvents mAutoHideDockBar As DevExpress.XtraBars.Docking.AutoHideContainer

        'Private mEditCalendarControl As EditCalendarControl

        Private mMode As Integer
        Private mCurrentControl As New Control
        Private mPrevControl As New Control

        Private mSourceItems As IList
        Private mSourceArea As AreaBase
        Private mSourceElementsCopied As Boolean = True
#End Region

#Region " Event Handlers "
        Private Sub MainView_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            If DesignMode Then Return

            AddHandler PhoenixApplication.AppNotification, AddressOf Application_Notification

            TaskPane.ActiveGroup = NavBarServices

        End Sub

        Private Sub Application_Notification(ByVal sender As Object, ByVal e As PhoenixEventArgs)
            Select Case e.EventCode
                Case PhoenixEventCode.CalendarRequested
                    GotoCalendar(CType(e, PhoenixCalendarEventArgs).Calendar, CType(e, PhoenixCalendarEventArgs).DateToShow)
                Case PhoenixEventCode.ConfigurationChanged
                    ChangeConfiguration()
            End Select
        End Sub
#End Region

#Region " Notification Handlers "
        Private Sub GotoCalendar(ByVal c As PhoenixCalendar, ByVal d As Date)
            Select Case c
                Case PhoenixCalendar.DayCalendar
                    DayCalendarArea.SetDate(d)
                    CalendarPane.ActiveGroup = NavBarDayCalendar
                Case PhoenixCalendar.MonthCalendar
                    MonthCalendarArea.SetDate(d)
                    CalendarPane.ActiveGroup = NavBarMonthCalendar
                Case PhoenixCalendar.Scheduler
                    ScheduleArea.SetDate(d)
                    CalendarPane.ActiveGroup = NavBarSchedule
                Case PhoenixCalendar.WeekCalendar
                    WeekCalendarArea.SetDate(d)
                    CalendarPane.ActiveGroup = NavBarWeekCalendar
            End Select
        End Sub
#End Region

#Region " Preferences & Configuration"
        Private Sub ChangeConfiguration()
            If AppConfig.TaskPaneLeft Then
                TaskPane.Dock = DockStyle.Left
                ContentPaneSplitter.Dock = DockStyle.Left
            Else
                TaskPane.Dock = DockStyle.Right
                ContentPaneSplitter.Dock = DockStyle.Right
            End If


            TaskPane.SmallImages = AppSharedComponents.ToolImages
            CalendarPane.SmallImages = AppSharedComponents.ToolImages

            BarManager.BeginUpdate()
            BarManager.Images = AppSharedComponents.ToolImages
            BarManager.EndUpdate()
        End Sub


        Private Sub LoadPreferences(ByVal parent As IPreferencesNode)
            Dim pref As IPreferencesNode
            Dim ba As Byte()

            ' BarManager
            pref = parent
            ba = pref.GetByteArray("Bars", Nothing) : If Not ba Is Nothing Then BarManager.RestoreFromStream(New MemoryStream(ba))

            ' TaskPane
            pref = parent.GetNodeForPath(TaskPane.Name)
            TaskPane.Width = pref.GetInt32("Width", TaskPane.Width)
            TaskPane.ActiveGroup = TaskPane.Groups(pref.GetString("Selected", TaskPane.ActiveGroup.Name))
            ba = pref.GetByteArray("Layout", Nothing) : If Not ba Is Nothing Then TaskPane.RestoreFromStream(New MemoryStream(ba))

            ' CalendarPane
            pref = parent.GetNodeForPath(CalendarPane.Name)
            CalendarPane.ActiveGroup = CalendarPane.Groups(pref.GetString("Selected", CalendarPane.ActiveGroup.Name))
            ba = pref.GetByteArray("Layout", Nothing) : If Not ba Is Nothing Then CalendarPane.RestoreFromStream(New MemoryStream(ba))

            ' ClientArea
            pref = parent.GetNodeForPath(ClientArea.Name)
            ba = pref.GetByteArray("Grid", Nothing) : If Not ba Is Nothing Then ClientArea.GridView.RestoreLayoutFromStream(New MemoryStream(ba))
            ClientArea.UpdateConfiguration()

            ' ServiceArea
            pref = parent.GetNodeForPath(ServiceArea.Name)
            ba = pref.GetByteArray("Grid", Nothing) : If Not ba Is Nothing Then ServiceArea.GridView.RestoreLayoutFromStream(New MemoryStream(ba))
            ServiceArea.UpdateConfiguration()

            ' EmployeeArea
            pref = parent.GetNodeForPath(EmployeeArea.Name)
            ba = pref.GetByteArray("Grid", Nothing) : If Not ba Is Nothing Then EmployeeArea.GridView.RestoreLayoutFromStream(New MemoryStream(ba))
            EmployeeArea.ApplyFilter()
            EmployeeArea.UpdateConfiguration()

            ' ProductArea
            pref = parent.GetNodeForPath(ProductArea.Name)
            ba = pref.GetByteArray("Grid", Nothing) : If Not ba Is Nothing Then ProductArea.GridView.RestoreLayoutFromStream(New MemoryStream(ba))
            ProductArea.UpdateConfiguration()

            'Restrict access
            If Not Security.IsManager Then
                ReportsBarItem.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
            Else
                ReportsBarItem.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
            End If

            'Groups
            NavBarClients.GroupClientHeight = 100
            NavBarProducts.GroupClientHeight = 100
            NavBarEmployees.GroupClientHeight = 100
            NavBarServices.GroupClientHeight = 100
            NavBarDayCalendar.GroupClientHeight = 100
            NavBarWeekCalendar.GroupClientHeight = 100
            NavBarMonthCalendar.GroupClientHeight = 100
            NavBarSchedule.GroupClientHeight = 100
        End Sub

        Friend Sub SavePreferences(ByVal parent As IPreferencesNode)
            Dim pref As IPreferencesNode
            Dim ms As MemoryStream

            ' BarManager
            pref = parent
            ms = New MemoryStream : BarManager.SaveToStream(ms) : pref.Item("Bars") = ms.ToArray()


            ' TaskPane
            pref = parent.GetNodeForPath(TaskPane.Name)
            pref.Item("Width") = TaskPane.Width
            pref.Item("Selected") = TaskPane.ActiveGroup.Name
            ms = New MemoryStream : TaskPane.SaveToStream(ms) : pref.Item("Layout") = ms.ToArray()

            ' CalendarPane
            pref = parent.GetNodeForPath(CalendarPane.Name)
            pref.Item("Selected") = CalendarPane.ActiveGroup.Name
            ms = New MemoryStream : CalendarPane.SaveToStream(ms) : pref.Item("Layout") = ms.ToArray()

            ' ClientArea
            pref = parent.GetNodeForPath(ClientArea.Name)
            ms = New MemoryStream : ClientArea.GridView.SaveLayoutToStream(ms) : pref.Item("Grid") = ms.ToArray()

            ' ServiceArea
            pref = parent.GetNodeForPath(ServiceArea.Name)
            ms = New MemoryStream : ServiceArea.GridView.SaveLayoutToStream(ms) : pref.Item("Grid") = ms.ToArray()

            ' EmployeeArea
            pref = parent.GetNodeForPath(EmployeeArea.Name)
            ms = New MemoryStream : EmployeeArea.GridView.SaveLayoutToStream(ms) : pref.Item("Grid") = ms.ToArray()

            ' ProductArea
            pref = parent.GetNodeForPath(ProductArea.Name)
            ms = New MemoryStream : ProductArea.GridView.SaveLayoutToStream(ms) : pref.Item("Grid") = ms.ToArray()
        End Sub

#End Region

#Region " Area Routines "
        Public Property ActiveArea() As AreaBase
            Get
                Return mActiveArea
            End Get
            Set(ByVal Value As AreaBase)
                If Not mActiveArea Is Value Then
                    mActiveArea = Value
                    OnActiveAreaChanged(EventArgs.Empty)
                End If
            End Set
        End Property

        Public Event ActiveAreaChanged(ByVal sender As Object, ByVal e As EventArgs)

        Private Sub OnGridSelectionChanged(ByVal sender As Object, ByVal args As EventArgs)
            If Not ActiveArea Is sender Then
                ActiveArea = sender
            End If
            UpdateEditCommands()
        End Sub

        Protected Overridable Sub OnActiveAreaChanged(ByVal e As EventArgs)
            UpdateEditCommands()

            If (ActiveArea Is MonthCalendarArea) Or _
            (ActiveArea Is WeekCalendarArea) Or _
            (ActiveArea Is DayCalendarArea) Or _
            (ActiveArea Is ScheduleArea) Then
                '                ActiveArea.PerformLayout()
            End If

            If (ActiveArea Is ScheduleArea) Then
                CType(ActiveArea, ScheduleArea).Calendar.ResizeScrollbars()
            End If


            RaiseEvent ActiveAreaChanged(Me, e)
        End Sub

        Private mActiveArea As AreaBase
        Private Sub UpdateEditCommands()
            NewProductBarItem.Enabled = Security.CanCreateProduct
            NewServiceBarItem.Enabled = Security.CanCreateService
            NewEmployeeBarItem.Enabled = Security.CanCreateEmployee
            NewClientBarItem.Enabled = True

            CopyBarItem.Enabled = ActiveArea.AllowCopy(ActiveArea.SelectedItems)
            CutBarItem.Enabled = ActiveArea.AllowCut(ActiveArea.SelectedItems)
            If ActiveArea Is mSourceArea And Not mSourceItems Is Nothing Then
                If mSourceItems.Count > 0 Then
                    PasteBarItem.Enabled = True
                Else
                    PasteBarItem.Enabled = False
                End If
            Else
                PasteBarItem.Enabled = False
            End If

            DeleteBarItem.Enabled = ActiveArea.AllowDelete(ActiveArea.SelectedItems)
            SelectAllBarItem.Enabled = True
        End Sub

#End Region

#Region " Menu Items Handlers "
        Private Sub ClientsViewBarItem_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles ClientsViewBarItem.ItemClick
            TaskPane.ActiveGroup = NavBarClients
        End Sub

        Private Sub EmployeesViewBarItem_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles EmployeesViewBarItem.ItemClick
            TaskPane.ActiveGroup = NavBarEmployees
        End Sub

        Private Sub ProductsViewBarItem_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles ProductsViewBarItem.ItemClick
            TaskPane.ActiveGroup = NavBarProducts
        End Sub

        Private Sub ServicesViewBarItem_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles ServicesViewBarItem.ItemClick
            TaskPane.ActiveGroup = NavBarServices
        End Sub

        Private Sub DayViewBarItem_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles DayViewBarItem.ItemClick
            CalendarPane.ActiveGroup = NavBarDayCalendar
            ActiveArea = DayCalendarArea
        End Sub

        Private Sub MonthViewBarItem_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles MonthViewBarItem.ItemClick
            CalendarPane.ActiveGroup = NavBarMonthCalendar
            ActiveArea = MonthCalendarArea
        End Sub

        Private Sub ScheduleViewBarItem_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles ScheduleViewBarItem.ItemClick
            CalendarPane.ActiveGroup = NavBarSchedule
            ActiveArea = ScheduleArea
        End Sub

        Private Sub WeekViewBarItem_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles WeekViewBarItem.ItemClick
            CalendarPane.ActiveGroup = NavBarWeekCalendar
            ActiveArea = WeekCalendarArea
        End Sub

        Private Sub OpenEmployeeBarItem_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles OpenEmployeeBarItem.ItemClick
            EmployeeArea.DoDefaultAction()
        End Sub

        Private Sub OpenProductBarItem_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles OpenProductBarItem.ItemClick
            ProductArea.DoDefaultAction()
        End Sub

        Private Sub OpenServiceBarItem_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles OpenServiceBarItem.ItemClick
            ServiceArea.DoDefaultAction()
        End Sub

        Private Sub OpenClientBarItem_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles OpenClientBarItem.ItemClick
            ClientArea.DoDefaultAction()
        End Sub

        Private Sub LogoffBarItem_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles LogoffBarItem.ItemClick
            AppLogout()
        End Sub

        Private Sub ExitBarItem_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles ExitBarItem.ItemClick
            AppExit()
        End Sub

        Private Sub OptionsBarItem_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles OptionsBarItem.ItemClick
            Dim options As OptionsDialog = New OptionsDialog
            options.ShowDialog()
        End Sub
        Private Sub NewBillBarItem_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles NewBillBarItem.ItemClick
            If ActiveArea Is ScheduleArea And ActiveArea.SelectedItems.Count > 0 Then
                Dim list As New ArrayList
                Dim applist As New ArrayList
                Dim size As Integer = 0
                Dim cID = -1
                While (size < ActiveArea.SelectedItems.Count)
                    For Each app As DataSetAppointments.Appointment In ActiveArea.SelectedItems
                        If cID = app.ClientID Then
                            applist.Add(app)
                            size = size + 1
                        ElseIf cID = -1 Then
                            cID = app.ClientID
                            applist.Add(app)
                            size = size + 1
                        End If
                    Next
                    BillForm.OpenForm(GetType(DataSetBill.Bill), cID)
                    cID = -1
                    list.Clear()
                    applist.Clear()
                End While
            Else
                BillForm.OpenForm(GetType(DataSetBill.Bill))
            End If
        End Sub
        Private Sub OnBillCreate(ByVal sender As Object)
        End Sub
        Private Sub BillNoSaleBarItem_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles BillNoSaleBarItem.ItemClick
            BillNoSaleForm.OpenForm(GetType(DataSetBill.PettyCashBill))
        End Sub
        Private Sub mnReports_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles ReportsBarItem.ItemClick
            Dim frm As New ReportsForm
            frm.ShowDialog()
        End Sub
#Region "Appointments"
        Private Sub mnAppointment_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles NewAppointmentBarItem.ItemClick
            Dim app As DataSetAppointments.Appointment

            Dim area As CalendarAreaBase = GetCurrentCalendarArea()
            If (area Is DayCalendarArea) Or (area Is ScheduleArea) Then
                app = AppointmentHelper.NewAppointment(area.Calendar.SelectedDateBegin)
            Else
                app = AppointmentHelper.NewAppointment(area.Calendar.SelectedDateBegin.Add(Now().TimeOfDay))
            End If

            If area.HasResources Then
                Dim index As Integer = area.Calendar.SelectedResource
                If (index >= 0) And (index < area.Calendar.Resources.Count) Then
                    Dim empl As DataSetData.Employee = area.Calendar.Resources.Item(area.Calendar.SelectedResource).Tag
                    If Not empl Is Nothing Then
                        app.PerformerID = empl.EmployeeID
                    End If
                End If
            End If

            AppointmentForm.OpenForm(app)
        End Sub
#End Region


        Private Sub NewClientBarItem_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles NewClientBarItem.ItemClick
            ClientForm.OpenForm(GetType(DataSetData.Client))
        End Sub

        Private Sub NewEmployeeBarItem_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles NewEmployeeBarItem.ItemClick
            EmployeeForm.OpenForm(GetType(DataSetData.Employee))
        End Sub

        Private Sub NewServiceBarItem_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles NewServiceBarItem.ItemClick
            ServiceForm.OpenForm(GetType(DataSetData.Service))
        End Sub

        Private Sub NewProductBarItem_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles NewProductBarItem.ItemClick
            ProductForm.OpenForm(GetType(DataSetData.Product))
        End Sub

#End Region

#Region " TaskPane/CalendarPane Event Handlers"
        Private Sub TaskPane_ActiveGroupChanged(ByVal sender As Object, ByVal e As NavBarGroupEventArgs) Handles TaskPane.ActiveGroupChanged
            If e.Group Is NavBarClients Then
                ClientsViewBarItem.Down = True
            ElseIf e.Group Is NavBarProducts Then
                ProductsViewBarItem.Down = True
            ElseIf e.Group Is NavBarServices Then
                ServicesViewBarItem.Down = True
            ElseIf e.Group Is NavBarEmployees Then
                EmployeesViewBarItem.Down = True
            End If
        End Sub

        Private Sub CalendarPane_ActiveGroupChanged(ByVal sender As Object, ByVal e As NavBarGroupEventArgs) Handles CalendarPane.ActiveGroupChanged
            If e.Group Is NavBarDayCalendar Then
                DayViewBarItem.Down = True
            ElseIf e.Group Is NavBarWeekCalendar Then
                WeekViewBarItem.Down = True
            ElseIf e.Group Is NavBarMonthCalendar Then
                MonthViewBarItem.Down = True
            ElseIf e.Group Is NavBarSchedule Then
                ScheduleViewBarItem.Down = True
            End If
        End Sub

#End Region

#Region " Init Salon Data "
        Private Sub PostInitializeComponent()
            BarManager.Controller = AppSharedComponents.BarAndDockingController

            ChangeConfiguration()
        End Sub

        Private mEmployeesDataView As DataView
        Private mProductsDataView As DataView
#End Region

#Region " Context menu handlers "
        Private Sub EmployeeView_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
            UpdateEditCommands()
        End Sub
#End Region

#Region " Edit commands "
        Private Sub Calendar_OnAppointmnetSelected(ByVal sender As Object, ByVal args As EventArgs) Handles DayCalendarArea.OnAppointmentSelected, MonthCalendarArea.OnAppointmentSelected, WeekCalendarArea.OnAppointmentSelected, ScheduleArea.OnAppointmentSelected
            ActiveArea = GetCurrentCalendarArea()
            UpdateEditCommands()
        End Sub

        Private Sub SelectAllBarItem_ItemClick(ByVal sender As Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles SelectAllBarItem.ItemClick
            ActiveArea.SelectAll()
        End Sub

        Private Sub CopyBarItem_ItemClick(ByVal sender As Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles CopyBarItem.ItemClick
            DoCutCopy(True)
            PasteBarItem.Enabled = True
        End Sub

        Private Sub DoCutCopy(ByVal copy As Boolean)
            mSourceItems = ActiveArea.Copy(ActiveArea.SelectedItems)
            mSourceArea = ActiveArea
            mSourceElementsCopied = copy
        End Sub

        Private Sub PasteBarItem_ItemClick(ByVal sender As Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles PasteBarItem.ItemClick
            If ActiveArea Is mSourceArea Then
                ActiveArea.Paste(mSourceItems)
            End If
            If Not mSourceElementsCopied Then
            End If
        End Sub

        Private Sub CutBarItem_ItemClick(ByVal sender As Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles CutBarItem.ItemClick
            'DoCutCopy(False)
        End Sub

        Private Sub DeleteBarItem_ItemClick(ByVal sender As Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles DeleteBarItem.ItemClick
            If ActiveArea.SelectedItems Is Nothing Then
                Return
            End If
            ActiveArea.Delete(ActiveArea.SelectedItems)
        End Sub


        Private Sub ClientView_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
            UpdateEditCommands()
        End Sub

        Private Sub ProductView_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
            UpdateEditCommands()
        End Sub

        Private Sub ServiceView_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
            UpdateEditCommands()
        End Sub
#End Region


        Private Sub GridView_MouseUp(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs)
            Dim view As GridView = CType(sender, GridView)
            If e.Button = MouseButtons.Right Then
                Dim hi As GridHitInfo = view.CalcHitInfo(New Point(e.X, e.Y))
                Select Case hi.HitTest
                    Case GridHitTest.EmptyRow
                    Case GridHitTest.Row
                    Case GridHitTest.RowCell
                    Case GridHitTest.RowEdge
                    Case GridHitTest.RowFooter
                    Case Else
                        Return
                End Select
            End If
        End Sub

        Private Sub GotoBarItem_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles GotoBarItem.ItemClick
            Dim dlg As GoToDialog = New GoToDialog

            If DayViewBarItem.Down Then
                dlg.ShowDialog(PhoenixCalendar.DayCalendar, DayCalendarArea.CurrentDate)
            ElseIf WeekViewBarItem.Down Then
                dlg.ShowDialog(PhoenixCalendar.WeekCalendar, WeekCalendarArea.CurrentDate)
            ElseIf MonthViewBarItem.Down Then
                dlg.ShowDialog(PhoenixCalendar.MonthCalendar, MonthCalendarArea.CurrentDate)
            ElseIf ScheduleViewBarItem.Down Then
                dlg.ShowDialog(PhoenixCalendar.Scheduler, ScheduleArea.CurrentDate)
            End If
        End Sub

        Private Sub RefreshDate(ByVal d As Date)
            ScheduleArea.SetDate(d)
            DayCalendarArea.SetDate(d)
            MonthCalendarArea.SetDate(d)
            WeekCalendarArea.SetDate(d)
        End Sub

        Private Sub PreviousBarButtonItem_ItemClick(ByVal sender As Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles PreviousBarButtonItem.ItemClick
            Dim d As Date = GetCurrentCalendarArea().SetPrev()
            RefreshDate(d)
        End Sub

        Private Sub NextBarButtonItem_ItemClick(ByVal sender As Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles NextBarButtonItem.ItemClick
            Dim d As Date = GetCurrentCalendarArea().SetNext()
            RefreshDate(d)
        End Sub

        Private Sub TodayBarButtonItem_ItemClick(ByVal sender As Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles TodayBarItem.ItemClick
            Dim d As Date = GetCurrentCalendarArea().SetToday()
            RefreshDate(d)
        End Sub

        Private Function GetCurrentCalendarArea() As CalendarAreaBase
            If ScheduleViewBarItem.Down Then
                Return ScheduleArea
            ElseIf DayViewBarItem.Down Then
                Return DayCalendarArea
            ElseIf MonthViewBarItem.Down Then
                Return MonthCalendarArea
            Else
                Return WeekCalendarArea
            End If
        End Function

        Private Sub CalendarPane_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles CalendarPane.GotFocus
            ActiveArea = GetCurrentCalendarArea()
        End Sub

        Private Sub ScheduleArea_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles ScheduleArea.GotFocus
            ActiveArea = ScheduleArea
        End Sub

        Private Sub WeekCalendarArea_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles WeekCalendarArea.GotFocus
            ActiveArea = WeekCalendarArea
        End Sub

        Private Sub DayCalendarArea_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles DayCalendarArea.GotFocus
            ActiveArea = DayCalendarArea
        End Sub

        Private Sub MonthCalendarArea_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles MonthCalendarArea.GotFocus
            ActiveArea = MonthCalendarArea
        End Sub

        Private mCurrentDate As DateTime = Today

        Private Sub Calendar_FirstDateChanged(ByVal sender As Object, ByVal args As DateRangeEventArgs) Handles WeekCalendarArea.FirstDateChanged, ScheduleArea.FirstDateChanged, DayCalendarArea.FirstDateChanged, MonthCalendarArea.FirstDateChanged
            mCurrentDate = args.Start
        End Sub

        Private Sub AboutBarItem_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles AboutBarItem.ItemClick
            AppAbout()
        End Sub

        Private Sub OpenAppointmentBarItem_ItemClick(ByVal sender As Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles OpenAppointmentBarItem.ItemClick
            Dim area As CalendarAreaBase = GetCurrentCalendarArea()

            For Each ca As ComponentGo.Calendars.Appointment In area.Calendar.Appointments
                If ca.Selected Then
                    If Not ca.Tag Is Nothing Then
                        If TypeOf ca.Tag Is DataSetAppointments.Appointment Then
                            AppointmentForm.OpenForm(ca.Tag)
                        End If
                    End If
                End If
            Next
        End Sub

        Private Sub PrintBarItem_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles PrintBarItem.ItemClick
            Dim result As DialogResult = PrintDialog.ShowDialog()
            If result = DialogResult.OK Then
                PrintDocument.Print()
            End If
        End Sub

        Private Sub PrintPreviewBarItem_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles PrintPreviewBarItem.ItemClick
            Try
                PrintPreviewDialog.Document = PrintDocument
                PrintPreviewDialog.ShowDialog()
            Catch ex As Exception
                AppMessageBox(ex.Message, MsgBoxStyle.Exclamation)
            End Try
        End Sub

        Private Sub PageSetupBarItem_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles PageSetupBarItem.ItemClick
            Try
                PageSetupDialog.ShowDialog()
            Catch ex As Exception
                AppMessageBox(ex.Message, MsgBoxStyle.Exclamation)
            End Try
        End Sub

        Private mPrintPageCols As Integer
        Private mPrintPageRows As Integer
        Private mPrintPage As Integer
        Private mPrintImage As Image
        Private mPrintGraphics As Graphics
        Private mPrintArea As Rectangle
        Private mPrintOffset As Size

        Private Sub PrintDocument_BeginPrint(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintEventArgs) Handles PrintDocument.BeginPrint
            mPrintPage = 1
        End Sub

        Private Sub PrintDocument_EndPrint(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintEventArgs) Handles PrintDocument.EndPrint
            If Not mPrintGraphics Is Nothing Then
                mPrintGraphics.Dispose()
                mPrintGraphics = Nothing
            End If

            If Not mPrintImage Is Nothing Then
                mPrintImage.Dispose()
                mPrintImage = Nothing
            End If
            GC.Collect()
        End Sub

        Private Sub CalculatePrintLayout(ByVal g As Graphics, ByVal settings As System.Drawing.Printing.PageSettings)
            Dim calArea As CalendarAreaBase = GetCurrentCalendarArea()
            Dim cal As ComponentGo.Calendars.BaseCalendar = calArea.Calendar

            mPrintArea = New Rectangle( _
                settings.Bounds.X + settings.Margins.Left, _
                settings.Bounds.Y + settings.Margins.Top, _
                settings.Bounds.Width - settings.Margins.Right - settings.Margins.Left, _
                settings.Bounds.Height - settings.Margins.Bottom - settings.Margins.Top)

            mPrintOffset = New Size(settings.Bounds.X + settings.Margins.Left, settings.Bounds.Y + settings.Margins.Top)

            mPrintPageCols = Math.Ceiling(cal.PrintCanvasRectangle.Width / mPrintArea.Width)
            mPrintPageRows = Math.Ceiling(cal.PrintCanvasRectangle.Height / mPrintArea.Height)
        End Sub

        Private Sub PrintDocument_PrintPage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument.PrintPage
            Dim calArea As CalendarAreaBase = GetCurrentCalendarArea()
            Dim cal As ComponentGo.Calendars.BaseCalendar = calArea.Calendar

            If (TypeOf cal Is ComponentGo.Calendars.MonthlyCalendar) Or (TypeOf cal Is ComponentGo.Calendars.WeeklyCalendar) Then
                cal.Print(e.Graphics, cal.ClientRectangle)
                e.HasMorePages = False
                Return
            End If

            If Not Phoenix.AppConfig.FitToPage Then
                cal.Print(e.Graphics, cal.ClientRectangle)
                e.HasMorePages = False
                Return
            End If

            If mPrintPage = 1 Then
                CalculatePrintLayout(e.Graphics, e.PageSettings)
                mPrintImage = New Bitmap(cal.PrintCanvasRectangle.Width, cal.PrintCanvasRectangle.Height)
                mPrintGraphics = Graphics.FromImage(mPrintImage)
                cal.Print(mPrintGraphics)
                'mPrintImage.Save("C:\print.bmp", Imaging.ImageFormat.Bmp)
            End If

            If Not Phoenix.AppConfig.FitToPage Then
                e.Graphics.DrawImage(mPrintImage, _
                    mPrintOffset.Width, _
                    mPrintOffset.Height, _
                    New Rectangle( _
                        ((mPrintPage - 1) Mod mPrintPageCols) * mPrintArea.Width, _
                        ((mPrintPage - 1) \ mPrintPageCols) * mPrintArea.Height, _
                        mPrintArea.Width, mPrintArea.Height), GraphicsUnit.Pixel)

                mPrintPage = mPrintPage + 1

                If mPrintPage > mPrintPageCols * mPrintPageRows Then
                    e.HasMorePages = False
                Else
                    e.HasMorePages = True
                End If
            Else
                e.Graphics.DrawImage(mPrintImage, _
                    mPrintOffset.Width, _
                    mPrintOffset.Height, _
                    Math.Min(mPrintArea.Width, mPrintImage.Width), _
                    Math.Min(mPrintArea.Height, mPrintImage.Height))

                e.HasMorePages = False
            End If
        End Sub


    End Class
End Namespace